Skip to content

Commit

Permalink
ShardID -> ShardId
Browse files Browse the repository at this point in the history
  • Loading branch information
wacban authored Nov 7, 2024
1 parent 39e353d commit d005643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neps/nep-0568.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ supporting smooth transitions without altering storage structures directly.

Currently, shard IDs are represented as numbers within the range `[0,n)`, where n is the total number of shards. These shard IDs are sorted in the same order as the account ID ranges assigned to them. While this approach is straightforward, it complicates resharding operations, particularly when splitting a shard in the middle of the range. Such a split requires reindexing all subsequent shards with higher IDs, adding complexity to the process.

In this NEP, we propose updating the ShardID semantics to allow for arbitrary identifiers. Although ShardIDs will remain integers, they will no longer be restricted to the `[0,n)` range, and they may appear in any order. The only requirement is that each ShardID must be unique. In practice, during resharding, the ID of a parent shard will be removed from the ShardLayout, and the new child shards will be assigned unique IDs - `max(shard_ids)+1` and `max(shard_ids)+2`.
In this NEP, we propose updating the ShardId semantics to allow for arbitrary identifiers. Although ShardIds will remain integers, they will no longer be restricted to the `[0,n)` range, and they may appear in any order. The only requirement is that each ShardId must be unique. In practice, during resharding, the ID of a parent shard will be removed from the ShardLayout, and the new child shards will be assigned unique IDs - `max(shard_ids)+1` and `max(shard_ids)+2`.

## Reference Implementation

Expand Down

0 comments on commit d005643

Please sign in to comment.