MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / slotToKeyUpdateKey

Function slotToKeyUpdateKey

src/db.cpp:2465–2467  ·  view source on GitHub ↗

Slot to Key API. This is used by Redis Cluster in order to obtain in * a fast way a key that belongs to a specified hash slot. This is useful * while rehashing the cluster and in other conditions when we need to * understand if we have keys for a given hash slot. */

Source from the content-addressed store, hash-verified

2463 * while rehashing the cluster and in other conditions when we need to
2464 * understand if we have keys for a given hash slot. */
2465void slotToKeyUpdateKey(sds key, int add) {
2466 slotToKeyUpdateKeyCore(key, sdslen(key), add);
2467}
2468
2469void slotToKeyUpdateKeyCore(const char *key, size_t keylen, int add) {
2470 serverAssert(GlobalLocksAcquired());

Callers 2

slotToKeyAddFunction · 0.85
slotToKeyDelFunction · 0.85

Calls 2

slotToKeyUpdateKeyCoreFunction · 0.85
sdslenFunction · 0.85

Tested by

no test coverage detected