Redis will check its replication backlog and clients list in function replicationFeedSlaves when it feed slaves. But it check this condition twice with /* a if statement and a redisAssert statement */. Do function replicationFeedSlaves need to do?
void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) {
listNode *ln;
listIter li;
int j, len;
char llstr[REDIS_LONGSTR_SIZE];
/* If there aren't slaves, and there is no backlog buffer to populate,
* we can return ASAP. */
if (server.repl_backlog == NULL && listLength(slaves) == 0) return;
/* We can't have slaves attached and no backlog. */
redisAssert(!(listLength(slaves) != 0 && server.repl_backlog == NULL));
}
Comment From: madolson
Those are not the same equality.