Skip to content

[Feature] Implement CLUSTER FLUSHSLOT command #1133

Open
@madolson

Description

@madolson

As part of the per-slot dictionary effort, we implemented all of the needed changes so that we could efficiently unlink and free the data in a single slot with lazyfree. This is useful in two cases:

  1. When a primary loses ownership of a slot, it will temporarily freeze while it synchronously frees the slot.
  2. When doing resharding, you may prefer to forcibly delete all the data from a slot and assign it to another node.

The main point where code needs to be updated:

unsigned int delKeysInSlot(unsigned int hashslot) {

Alternative naming conventions (Naming was finalized, leaving for historical purposes):

  1. SFLUSH (presumably slot flush). The S prefix is also used for set, so it may not make the most sense to emulate.
  2. FLUSHSLOT. Since this is mostly be an admin command, it might make sense to attach the cluster.

Metadata

Metadata

Assignees

Labels

client-changes-neededClient changes may be required for this featureenhancementNew feature or requesthelp wantedExternal contributions would be appreciatedmajor-decision-approvedMajor decision approved by TSC team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions