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

Add ReshardingOperation::Start consensus message #4238

Merged
merged 13 commits into from
May 17, 2024

Conversation

ffuugoo
Copy link
Contributor

@ffuugoo ffuugoo commented May 14, 2024

Tracked in #4213.

This PR adds ReshardingOperation::Start consensus message. And also (in the most trivial way) disables splitting read operations to the resharding shard.

Important TODO to be fixed in some future PR: consensus snapshot does not handle resharding in any way yet.

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --all --all-features command?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

lib/collection/src/shards/shard_holder.rs Outdated Show resolved Hide resolved
lib/collection/src/shards/shard_holder.rs Outdated Show resolved Hide resolved
lib/collection/src/shards/shard_holder.rs Outdated Show resolved Hide resolved
lib/collection/src/shards/shard_holder.rs Show resolved Hide resolved
Comment on lines 657 to 662
pub async fn start_resharding(
&self,
peer_id: PeerId,
shard_id: ShardId,
) -> CollectionResult<()> {
Copy link
Member

Choose a reason for hiding this comment

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

Eventually we probably want to extend this to allow more shard configurations, but we can do that then.

lib/collection/src/hash_ring.rs Outdated Show resolved Hide resolved
lib/collection/src/shards/shard_holder.rs Outdated Show resolved Hide resolved
lib/collection/src/shards/shard_holder.rs Outdated Show resolved Hide resolved
lib/collection/src/shards/shard_holder.rs Show resolved Hide resolved
lib/storage/src/content_manager/collection_meta_ops.rs Outdated Show resolved Hide resolved
@timvisee timvisee force-pushed the add-start-resharding-consensus-message branch from a04ddd8 to 9cdb02d Compare May 17, 2024 11:51
@ffuugoo ffuugoo merged commit 2c96890 into dev May 17, 2024
17 checks passed
@ffuugoo ffuugoo deleted the add-start-resharding-consensus-message branch May 17, 2024 14:58
generall pushed a commit that referenced this pull request May 26, 2024
Co-authored-by: timvisee <tim@visee.me>
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.

None yet

3 participants