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

MINOR: Fix stale comment in partition reassignment javadoc #7438

Merged
merged 2 commits into from
Oct 9, 2019

Conversation

stanislavkozlovski
Copy link
Contributor

During the cleanup phase of an overriding reassignment, we failed to mention that we still add replicas in the adding_replicas field for the initial LeaderAndIsr request

@stanislavkozlovski
Copy link
Contributor Author

As said in the javadoc:

* Cleanup Phase: In the cases where this reassignment has to override an ongoing reassignment.
   *   . The ongoing reassignment is in phase A
   *   . ORS denotes the original replica set, prior to the ongoing reassignment
   *   . URS denotes the unnecessary replicas, ones which are currently part of the AR of the ongoing reassignment but will not be part of the new one
   *   . OVRS denotes the overlapping replica set - replicas which are part of the AR of the ongoing reassignment and will be part of the overriding reassignment
   *       (it is essentially (RS - ORS) - URS)

We do want to keep AR=OVRS because the overriding reassignment will have it too - no need to risk shrinkage of ISR during the race between this first LAIR and the subsequent LAIR that adds the proper AR/RR fields

Here is the code which shows that we send AR=OVRS

updateLeaderEpochAndSendRequest(topicPartition, intermediateReplicaAssignment.replicas, intermediateReplicaAssignment)

cc @viktorsomogyi @cmccabe

Copy link
Contributor

@viktorsomogyi viktorsomogyi left a comment

Choose a reason for hiding this comment

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

Ok, while we're at it, shouldn't this say RR = [] at the end? (And in the line below?)

* 1 Set RS = ORS + OVRS, AR = OVRS, RS = [] in memory

@stanislavkozlovski
Copy link
Contributor Author

Yes, good catch. Thanks!

@cmccabe
Copy link
Contributor

cmccabe commented Oct 9, 2019

LGTM

@cmccabe cmccabe merged commit c620b73 into apache:trunk Oct 9, 2019
asfgit pushed a commit that referenced this pull request Oct 9, 2019
Reviewers: Colin P. McCabe <cmccabe@apache.org>, Viktor Somogyi <viktorsomogyi@gmail.com>
(cherry picked from commit c620b73)
@stanislavkozlovski stanislavkozlovski deleted the patch-1 branch October 11, 2019 17:49
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.

3 participants