Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command migration - multishard commands (Touch, DBSize, Keys) #1301

Merged
merged 8 commits into from
Nov 20, 2024

Conversation

AshwinKul28
Copy link
Contributor

This PR migrates multiple multi-shard DiceDB commands to support multi-threading. The migration follows a structured flow for each command type as described below.

Multi-Shard Commands The following commands are migrated with support for multi-shard processing:

  1. Touch
  2. DBSize
  3. Keys

For the Touch command, the flow includes a single step to update the last access time of keys across multiple shards. For the DBSize command, the flow includes a single step to calculate the total size of the database across multiple shards. For the Keys command, the flow includes a single step to retrieve a list of keys across multiple shards based on the give n pattern.

Introduced new type of commands - AllShards.

Reason

  • Keys: This command needs to check across all shards where the pattern is matching to any keys or not
  • DBSize: This command needs to go through all shards and accumulate number of keys across all shards at the end.

Copy link
Collaborator

@JyotinderSingh JyotinderSingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these changes @AshwinKul28! They look good, just a few minor comments.

docs/src/content/docs/commands/TOUCH.md Outdated Show resolved Hide resolved
tmp/build-errors.log Outdated Show resolved Hide resolved
Copy link
Collaborator

@JyotinderSingh JyotinderSingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JyotinderSingh JyotinderSingh merged commit 05414a3 into DiceDB:master Nov 20, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants