Skip to content

Enhancement: don't mark server.dirty if bitset doesn't change the value #1314

@ChrisCurtin

Description

@ChrisCurtin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:help-wantedNo member is currently implementing this change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions