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

Resharding code cleanup #4349

Merged
merged 5 commits into from
May 29, 2024
Merged

Resharding code cleanup #4349

merged 5 commits into from
May 29, 2024

Conversation

ffuugoo
Copy link
Contributor

@ffuugoo ffuugoo commented May 29, 2024

Tracked in #4213.

Minor cleanups for resharding code.

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?

@ffuugoo ffuugoo requested a review from timvisee May 29, 2024 09:31
@ffuugoo ffuugoo mentioned this pull request May 29, 2024
88 tasks
Comment on lines +26 to +28
self.peer_id == key.peer_id
&& self.shard_id == key.shard_id
&& self.shard_key == key.shard_key
Copy link
Member

Choose a reason for hiding this comment

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

How about self.key() == key?

Suggested change
self.peer_id == key.peer_id
&& self.shard_id == key.shard_id
&& self.shard_key == key.shard_key
self.key() == key

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't like the extra clone. 😂

@timvisee timvisee merged commit 43feadf into dev May 29, 2024
17 checks passed
@timvisee timvisee deleted the resharding-state-cleanup branch May 29, 2024 11:13
timvisee pushed a commit that referenced this pull request Jun 11, 2024
* Move `ReshardingState` from `collection/resharding` to `shards/resharding`

* Sort `ReshardingKey` derives

* Add `ReshardingState::matches` method

* Implement `fmt::Display` for `ReshardingKey`

* Misc resharding cleanup
@timvisee timvisee added this to the v1.11: resharding milestone Jul 18, 2024
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