Fix cluster test fail

This commit is contained in:
John Sully 2022-03-07 16:39:01 -05:00
parent 4697923f41
commit 5df39b56ac

View File

@ -2488,7 +2488,10 @@ void slotToKeyUpdateKeyCore(const char *key, size_t keylen, int add) {
} else { } else {
fModified = raxRemove(g_pserver->cluster->slots_to_keys,indexed,keylen+2,NULL); fModified = raxRemove(g_pserver->cluster->slots_to_keys,indexed,keylen+2,NULL);
} }
serverAssert(fModified); // This assert is disabled when a snapshot depth is >0 because prepOverwriteForSnapshot will add in a tombstone,
// this prevents ensure from adding the key to the dictionary which means the caller isn't aware we're already tracking
// the key.
serverAssert(fModified || g_pserver->db[0]->snapshot_depth() > 0);
if (indexed != buf) zfree(indexed); if (indexed != buf) zfree(indexed);
} }