Call propagate instead of writing directly to AOF/replicas (#6658)

Use higher-level API to funnel all generic propagation through
single function call.
This commit is contained in:
Kevin McGehee 2020-07-29 17:54:37 -07:00 committed by GitHub
parent 7af05f07ff
commit b55c1602b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1228,9 +1228,7 @@ void propagateExpire(redisDb *db, robj *key, int lazy) {
incrRefCount(argv[0]);
incrRefCount(argv[1]);
if (server.aof_state != AOF_OFF)
feedAppendOnlyFile(server.delCommand,db->id,argv,2);
replicationFeedSlaves(server.slaves,db->id,argv,2);
propagate(server.delCommand,db->id,argv,2,PROPAGATE_AOF|PROPAGATE_REPL);
decrRefCount(argv[0]);
decrRefCount(argv[1]);