@@ -434,7 +434,7 @@ void feedReplicationBuffer(char *s, size_t len) {
434434 * received by our clients in order to create the replication stream.
435435 * Instead if the instance is a replica and has sub-replicas attached, we use
436436 * replicationFeedStreamFromMasterStream() */
437- void replicationFeedSlaves (list * slaves , int dictid , robj * * argv , int argc ) {
437+ void replicationFeedSlaves (int dictid , robj * * argv , int argc ) {
438438 int j , len ;
439439 char llstr [LONG_STR_SIZE ];
440440
@@ -451,7 +451,7 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) {
451451
452452 /* If there aren't slaves, and there is no backlog buffer to populate,
453453 * we can return ASAP. */
454- if (server .repl_backlog == NULL && listLength (slaves ) == 0 ) {
454+ if (server .repl_backlog == NULL && listLength (server . slaves ) == 0 ) {
455455 /* We increment the repl_offset anyway, since we use that for tracking AOF fsyncs
456456 * even when there's no replication active. This code will not be reached if AOF
457457 * is also disabled. */
@@ -1313,6 +1313,9 @@ int replicaPutOnline(client *slave) {
13131313 NULL );
13141314 serverLog (LL_NOTICE ,"Synchronization with replica %s succeeded" ,
13151315 replicationGetSlaveName (slave ));
1316+
1317+ /* Replicate slot being migrated/imported to the new replica */
1318+ clusterReplicateOpenSlots ();
13161319 return 1 ;
13171320}
13181321
@@ -3788,8 +3791,7 @@ void replicationCron(void) {
37883791
37893792 if (!manual_failover_in_progress ) {
37903793 ping_argv [0 ] = shared .ping ;
3791- replicationFeedSlaves (server .slaves , -1 ,
3792- ping_argv , 1 );
3794+ replicationFeedSlaves (-1 , ping_argv , 1 );
37933795 }
37943796 }
37953797
0 commit comments