MCPcopy Create free account
hub / github.com/F-Stack/f-stack / flushSlaveKeysWithExpireList

Function flushSlaveKeysWithExpireList

app/redis-6.2.6/src/expire.c:462–467  ·  view source on GitHub ↗

Remove the keys in the hash table. We need to do that when data is * flushed from the server. We may receive new keys from the master with * the same name/db and it is no longer a good idea to expire them. * * Note: technically we should handle the case of a single DB being flushed * but it is not worth it since anyway race conditions using the same set * of key names in a writable slave and

Source from the content-addressed store, hash-verified

460 * of key names in a writable slave and in its master will lead to
461 * inconsistencies. This is just a best-effort thing we do. */
462void flushSlaveKeysWithExpireList(void) {
463 if (slaveKeysWithExpire) {
464 dictRelease(slaveKeysWithExpire);
465 slaveKeysWithExpire = NULL;
466 }
467}
468
469int checkAlreadyExpired(long long when) {
470 /* EXPIRE with negative TTL, or EXPIREAT with a timestamp into the past

Callers 1

emptyDbFunction · 0.85

Calls 1

dictReleaseFunction · 0.70

Tested by

no test coverage detected