leonchen83/redis-rdb-cli

Bloom keys not synced to target redis instance

Prudhvi0717 opened this issue · 1 comments

When Syncing redis instances with "rst" the data and bloom filters and its keys in initial snapshot are being migrated to target instance. But during further sync the new created bloom keys are not being synced. The normal keys are synced seamlessly.

So can we also have the bloom keys be synced? Is there anyway to do this? @leonchen83

Hi @Prudhvi0717
Unfortunately yes, redis-rdb-cli does not support third party modules like redisbloom, rejson and etc.
Because there are too many third party modules. so implement module sync is very hard(we should parse every module command and sync these commands to target)

If you want to sync bloom filter. You should fork this project and modify following java class to support above modules

XRst.java
SingleRdbVisitor.java in ext/rst package
ClusterRdbVisitor.java in ext/rst package

step1: in XRst.java
write your own bloom filter command parser and register parsers to replicator like following

// since redis 7.0
replicator.addCommandParser(CommandName.name("SPUBLISH"), new CombineCommandParser(new SPublishParser()));
replicator.addCommandParser(CommandName.name("FUNCTION"), new CombineCommandParser(new FunctionParser()));

step2: in SingleRdbVisitor and ClusterRdbVisitor
handle bloom filter command and synced to target redis instance