Hi,
We have a redis-backed bloom filter where when we add something to the filter we send between 2 and 10 'setbit' calls to Redis in a pipeline. Rather than do the 'getbit' on each value then only set the ones we want, we always set them all.
Looking at the code it appears that Redis will set data byte and the 'server.dirty' flag even if the bit's value didn't change. This then leads to additional AOF writes, even though nothing changed.
I think checking the 'before' value against the value to set could skip the AOF write.
Thanks,
Chris
Comment From: yoav-steinberg
This sounds reasonable. Can you issue a PR?
Comment From: enjoy-binbin
@yoav-steinberg @madolson I try to fix it in the PR above. Please take a look for me. See if i got it right