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

Function slotToKeyFlush

app/redis-6.2.6/src/db.c:1955–1962  ·  view source on GitHub ↗

Empty the slots-keys map of Redis CLuster by creating a new empty one and * freeing the old one. */

Source from the content-addressed store, hash-verified

1953/* Empty the slots-keys map of Redis CLuster by creating a new empty one and
1954 * freeing the old one. */
1955void slotToKeyFlush(int async) {
1956 rax *old = server.cluster->slots_to_keys;
1957
1958 server.cluster->slots_to_keys = raxNew();
1959 memset(server.cluster->slots_keys_count,0,
1960 sizeof(server.cluster->slots_keys_count));
1961 freeSlotsToKeysMap(old, async);
1962}
1963
1964/* Populate the specified array of objects with keys in the specified slot.
1965 * New objects are returned to represent keys, it's up to the caller to

Callers 1

emptyDbFunction · 0.85

Calls 3

raxNewFunction · 0.85
memsetFunction · 0.85
freeSlotsToKeysMapFunction · 0.85

Tested by

no test coverage detected