DiceDB / dice

DiceDB is a redis-compliant, reactive, scalable, highly-available, unified cache optimized for modern hardware.
https://dicedb.io/
Other
6.83k stars 1.08k forks source link

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

Closed AshwinKul28 closed 1 day ago

AshwinKul28 commented 2 days ago

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