-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Redis OBJECT command support #650
Conversation
|
@@ -141,6 +142,7 @@ typedef enum msg_parse_result { | |||
ACTION( REQ_REDIS_RPUSH ) \ | |||
ACTION( REQ_REDIS_RPUSHX ) \ | |||
ACTION( REQ_REDIS_SADD ) /* redis requests - sets */ \ | |||
ACTION( REQ_REDIS_SADDINT ) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SADDINT isn't merged into redis, even in the unstable branch. I'm not sure what this command is meant to be, couldn't find it in a quick google search.
EDIT: Your KeyDB proposal hasn't been reviewed yet, and regardless, there aren't currently plans to support KeyDB due to full support for KeyDB being a potentially large project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you may visit the PR at keydb
@@ -971,6 +974,11 @@ redis_parse_req(struct msg *r) | |||
break; | |||
} | |||
|
|||
if (str6icmp(m, 'o', 'b', 'j', 'e', 'c', 't')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just this change isn't enough to support OBJECT
- twemproxy will treat the first string after the command name as the key (to shard on), but here, the subcommand is in that position, so it will go to the wrong server when there's more than one server. https://redis.io/commands/object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the main purpose for supporting OBJECT is to get the encoding sub-command. even on sharding scenario, why we can't assume that all object have same encoding?
client app must understand that the answer for other sub-command other than encoding (refcount, freq, idletime) may differ from one server to another.
even for that. why we can't support this OBJECT command?
@@ -70,7 +70,7 @@ The build steps are the same (`./configure; make; sudo make install`). | |||
-D, --describe-stats : print stats description and exit | |||
-v, --verbose=N : set logging level (default: 5, min: 0, max: 11) | |||
-o, --output=S : set logging file (default: stderr) | |||
-c, --conf-file=S : set configuration file (default: conf/nutcracker.yml) | |||
-c, --conf-file=S : set configuration file (default: /etc/nutcracker/nutcracker.yml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is backwards incompatible, only works on *nix
-like systems, and is unrelated to new redis command support. Remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noted, thanks. I will revert it.
src/nc.c
Outdated
@@ -28,7 +28,7 @@ | |||
#include <nc_conf.h> | |||
#include <nc_signal.h> | |||
|
|||
#define NC_CONF_PATH "conf/nutcracker.yml" | |||
#define NC_CONF_PATH "/etc/nutcracker/nutcracker.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is backwards incompatible, only works on *nix
-like systems, and is unrelated to new redis command support. Remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about defining something based on OS info?
@@ -0,0 +1,30 @@ | |||
nutcracker (0.4.1+dfsg-1) unstable; urgency=medium |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debian support is completely unrelated to new redis command support and should not be part of the same PR.
Additionally, I don't have any experience with debian packaging and wouldn't be able to review this, anyway - The debian package maintainers who originally wrote these files could continue to do so without these being checked in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. you may ignore all the debian folder
@@ -0,0 +1,58 @@ | |||
Description: Use system libyaml | |||
Author: Faidon Liambotis <paravoid@debian.org> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separately from that: Though I don't work for twitter, this repo still requires the CLA for contributions, and these files are authored by someone else - https://cla-assistant.io/twitter/twemproxy
Though how that could be fixed is irrelevant since I don't plan on including the changes made for debian packagers in this repo itself for the previously stated reasons.
- You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions.
- Should You wish to submit work that is not Your original creation, You may submit it to Twitter separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Not a Contribution. Third-party materials licensed pursuant to: [license name(s) here]" (substituting the bracketed text with the appropriate license name(s)).
debian/patches/use_system_libyaml
Outdated
AC_MSG_RESULT($disable_stats) | ||
|
||
-# Untar the yaml-0.1.4 in contrib/ before config.status is rerun | ||
-AC_CONFIG_COMMANDS_PRE([tar xvfz contrib/yaml-0.1.4.tar.gz -C contrib]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelatedly, these patches are outdated - twemproxy 0.5.0 is using yaml-0.2.5
Though this is irrelevant since I don't plan on including the changes made for debian packagers in this repo itself for the previously stated reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure. will change that a.s.a.p.
thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stated multiple times earlier in this review that I have no plans to add debian support to this repo. |
Hi,
as requested at issue #649, I try to add support to OBJECT command and couple of debian-based packaging files.