-
Notifications
You must be signed in to change notification settings - Fork 578
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
introducing new configuration option auto-convert-intset-encoding #354
Conversation
src/t_set.cpp
Outdated
if (checkType(c,set,OBJ_SET)) return; | ||
|
||
if (set == NULL) { | ||
//set = setTypeCreate(szFromObj(c->argv[2])); |
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.
Remove commented out code
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 kow it's hard, but forcing Werror and O3 while compiling, it keep our code clean.
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.
Re Werror, KeyDB's policy is to have no warnings during build, however because we ship source code we get compiled on all sorts of compilers and different versions of GCC all with their own warnings. Therefore we don't enable this flag as it causes problems for downstream users. If you look in our CI file however you'll notice we do use this flag where its in a controlled situation.
Re -O3 in benchmarks it makes no perceptible difference and introduces a higher risk for bugs.
utils/tracking_collisions.c
Outdated
@@ -12,7 +12,7 @@ | |||
* | |||
* Compile with: | |||
* | |||
* cc -O2 ./tracking_collisions.c ../src/crc64.c ../src/sha1.c | |||
* cc -O3 ./tracking_collisions.c ../src/crc64.c ../src/sha1.c |
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.
unrelated
Hi @steamboatid We had a little internal debate about this. The question that came up was why do we need both a configuration option and a specific command? Shouldn't just the auto_convert_intset_encoding setting be sufficient? We have agreed we should take one or the other but can't reach agreement on having both, hopefully your experience will be instructive in resolving this debate. Also it seems there are quite a few unrelated changes here, would you be able to scope the PR to just the changes necessary for this feature? |
Hi @JohnSully , of course I agreed, fyi, For the new config option named as "auto-convert-intset-encoding" For the SADDINT command. Despite of having concrete blue print on how to develop keydb further, best regards, |
But the question is, if you disable auto-convert-intset-encoding then SADDINT is redundant is it not? Do you have a situation where you want some sets converted and some not? |
yes. especially if the sets size reach set-max-intset-entries. |
7aa9296
to
a12dcea
Compare
Hi,
I'm introducing new boolean configuration option named as "auto-convert-intset-encoding" to prevent auto encoding sets from intset into hashtable. by default, it's yes to retain the old behaviour.
when auto-convert-intset-encoding set to no, set with intset encoding will retain its encoding and ignore "set-max-intset-entries".
also I add SADDINT command to always save sets as intset
thanks