The problem/use-case that the feature addresses
A description of the problem that the feature will solve, or the use-case with which the feature will be used.
send 2 kind of REPLCONF to get rdb
REPLCONF rdb-filter-only functions
REPLCONF rdb-only 1
Description of the feature
A description of what you want to happen.
unify REPLCONF rdb-filter-only ${filter} and REPLCONF rdb-only 1 to one REPLCONF command
-
if get the whole rdb send
REPLCONF include-filter rdb -
if only get functions ~~(it's also return a kind of rdb only with functions)~~ send
REPLCONF include-filter function -
if get function and replication stream send
REPLCONF include-filter functionandREPLCONF include-filter stream -
if we only want get ~~aof~~ replication stream send
REPLCONF include-filter streamto replaceREPLCONF rdb-filter-only ""
after do above change. we can also unify redis-cli's rdb and rdb-functionoption. replace them to
redis-cli --rdb <filename> [filter]
Alternatives you've considered
Any alternative solutions or features you've considered, including references to existing open and closed feature requests in this repository.
Additional information
Any additional information that is relevant to the feature request.
Comment From: leonchen83
or REPLCONF filter include rdb and REPLCONF filter include function and REPLCONF filter include aof
if we want exclude something we could send REPLCONF filter exclude aux,module-aux
Comment From: yoav-steinberg
I don't understand the motivation behind this. The replication process in redis is as following: 1) Generate and RDB and send it. 2) Send replication stream.
rdb-filter-only is used to control 1 above. It's a filter mechanism for what goes in the RDB.
rdb-only is used to disable 2 above.
These REPLCONF options are somewhat tightly bound the to replication process and it's implementation. This makes them simple to implement and understand. Why change this?
I'm marking to be closed.
Comment From: ShooterIT
Yes, I agree rdb-only and rdb-filter-only are two different level, I think we should keep them @leonchen83
@yoav-steinberg But i think rdb-filter-only is not a good name, why we need only word, i think rdb-filter is enough, filter already means we want to filter something, WDYT?
Comment From: leonchen83
@ShooterIT
@yoav-steinberg
I mean rdb-only is a special case of replication stream filter, it's like rdb-filter-only 'don't send replication stream just rdb'
rdb-filter-only function like rdb-filter-only 'rdb function part and replication stream part'
Comment From: ShooterIT
I mean rdb-only is a special case of replication stream filter
so rdb-only should be replication-filter rdb and rdb-filter-only function should be replication-filter function?
Comment From: leonchen83
in this case rdb-filter-only function shoud be replication-filter function,stream
or send 2 replconf command to clearly request funciton and stream
replication-filter function and replication-filter stream
Comment From: ShooterIT
even replication word is not needed, just filter
replconf filter rdb
replconf filter function
Comment From: yoav-steinberg
@yoav-steinberg But i think
rdb-filter-onlyis not a good name, why we needonlyword, i thinkrdb-filteris enough,filteralready means we want to filter something, WDYT?
The original thought behind the name is that we want two replconf options:
- rdb-fileter-only x,y,z which is an "include" filter - anything in the list (x,y,z...) will be included in the resulting rdb.
- rdb-filter-exclude x,y,z.. which is an "exclude" filter - anything in the list will be excluded from the resulting rdb.
At this stage we only needed the "include" filter so that's what I implemented.
Comment From: ShooterIT
why not rdb-fileter-include? i think it is better than rdb-fileter-only
Comment From: yoav-steinberg
why not
rdb-filter-include? i think it is better thanrdb-fileter-only
I vaguely remember discussing this with @oranagra, I think we thought it won't be clean that include means "include only these things". Maybe if/when we add the rdb-filter-exclude we'll add an alias: rdb-fileter-only -> rdb-filter-include. Remeber that REPLCONF in general is an internal undocumented API which we have some leeway when we want to change in the future.