File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1299,11 +1299,11 @@ void backgroundSaveDoneHandlerSocket(int exitcode, int bysignal) {
12991299 * can continue to be emtpy, so that it's just a speical case of the
13001300 * normal code path. */
13011301 ok_slaves = zmalloc (sizeof (uint64_t )); /* Make space for the count. */
1302- ok_slaves = 0 ;
1302+ ok_slaves [ 0 ] = 0 ;
13031303 if (!bysignal && exitcode == 0 ) {
13041304 int readlen = sizeof (uint64_t );
13051305
1306- if (read (server .rdb_pipe_read_result_from_child , ok_slaves , readlen ) ! =
1306+ if (read (server .rdb_pipe_read_result_from_child , ok_slaves , readlen ) = =
13071307 readlen )
13081308 {
13091309 readlen = ok_slaves [0 ]* sizeof (uint64_t );
@@ -1335,14 +1335,18 @@ void backgroundSaveDoneHandlerSocket(int exitcode, int bysignal) {
13351335 if (slave -> replstate == REDIS_REPL_WAIT_BGSAVE_END ) {
13361336 uint64_t j ;
13371337
1338- for (j = 1 ; j < ok_slaves [0 ]; j ++ ) {
1339- if (slave -> id == ok_slaves [j ]) break ; /* Found in the OK list. */
1338+ for (j = 0 ; j < ok_slaves [0 ]; j ++ ) {
1339+ if (slave -> id == ok_slaves [j + 1 ]) break ; /* Found in OK list. */
13401340 }
13411341 if (j == ok_slaves [0 ]) {
13421342 redisLog (REDIS_WARNING ,
13431343 "Closing slave %llu: child->slave RDB transfer failed." ,
13441344 slave -> id );
13451345 freeClient (slave );
1346+ } else {
1347+ redisLog (REDIS_WARNING ,
1348+ "Slave %llu correctly received the streamed RDB file." ,
1349+ slave -> id );
13461350 }
13471351 }
13481352 }
You can’t perform that action at this time.
0 commit comments