Skip to content

Avoid recalculating cluster slot when the I/O thread has already done so #2077

Description

@zuiderkwast

Currently, the the IO thread just computes the cluster slot based on the first key, to be able to prefetch the keys.

When getNodeByQuery is executed (detects cross-slot commands, etc.) then it needs to check that all keys hash to the same slot. To make it possible to skip this step, the IO thread would need to check all keys and only set c->slot if all keys hash to the same slot. Then, getNodeByQuery can trust c->slot if it's already set and skip the expensive hashslot calculations.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions