Skip to content

Investigate having 1 dictionary per slot in CME instead of a key->slot linked list. #10589

@madolson

Description

@madolson

Now that we have pretty decisively decided that we are not going to have multiple databases in CME, we can potentially consider further improving the work done in #9356 by having a dictionary per slot. Since we have to compute the slot before executing a command, and commands bound to single slots, we should already know which one of the dictionaries a command operates on before executing it.

This work enables us to remove the linked list structure that overlays the current dictionary, since we will have a slot->key mapping, which is required for slot migration.

Some implementation notes:

  1. SCAN becomes more complex, as we need to embed which of the dictionaries we are located in. We should be able to handle this.
  2. The memory overhead should be better amortized, as each individual dict would rehash independently. In the degenerate case of owning 1 slot, this doesn't change that much though.

Documented from the idea outlined here: #9356 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions