Skip to content

Commit

Permalink
fix redisSlave hang after dumping fail too quick
Browse files Browse the repository at this point in the history
  • Loading branch information
lishanglin committed Sep 9, 2024
1 parent a7051fa commit 7d8d789
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -796,8 +796,12 @@ public void fullSyncToSlave(final RedisSlave redisSlave) throws IOException {
}

try{
dumpNewRdb(tryRordb);
RdbDumper newDumper = dumpNewRdb(tryRordb);
redisSlave.waitForRdbDumping();
if (newDumper.future().isDone() && !newDumper.future().isSuccess()) {
logger.info("[fullSyncToSlave][new dumper fail immediatelly]");
redisSlave.close();
}
}catch(AbstractRdbDumperException e){
logger.error("[fullSyncToSlave]", e);
if(e.isCancelSlave()){
Expand Down

0 comments on commit 7d8d789

Please sign in to comment.