-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-24186: RegionMover ignores replicationId #1512
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
Conversation
add replicationId to RegionMover logic
|
🎊 +1 overall
This message was automatically generated. |
virajjasani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
|
Pending QA |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
| } | ||
| HRegionLocation loc = | ||
| conn.getRegionLocator(region.getTable()).getRegionLocation(region.getStartKey(), true); | ||
| conn.getRegionLocator(region.getTable()).getRegionLocation(region.getStartKey(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there already a test, which covers the old as well as the new behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Existing test cases are good. But yes good to add additional test case specific for replicaId. @BukrosSzabolcs can you add a test case in TestRegionMover ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue was found by a test. IntegrationTestTimeBoundedRequestsWithRegionReplicas failed while running with chaos monkey using GracefulRollingRestartRsAction. So there is coverage just not in TestRegionMover. Would that be sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great that IT test found this issue but they are not run as part of QA build. Hence, if we can have one unit test, that would be really great. QA will always run it. Sounds good @BukrosSzabolcs ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, since we have an IT that covers this, ideally it should be fine and maybe you can take up unit test as separate child Jira of this Jira.
Should be good @HorizonNet ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized my original description of the issue is not correct. This does not prevent the moving of the region, the result of getServerNameForRegion() is only used in the validation of the move, so it only forces the move to try to repeat itself because it does not realize the move already happened. So it just slows down the process but not break it.
I tried to write a test for this, but the only thing I could come up with is a test that goes trough regions on a rs and checks if getServerNameForRegion founds the correct server for it. I can add it if you insist but I see very little added value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then let it be.
Signed-off-by: Jan Hentschel <[email protected]> Signed-off-by: Viraj Jasani <[email protected]>
Signed-off-by: Jan Hentschel <[email protected]> Signed-off-by: Viraj Jasani <[email protected]>
Signed-off-by: Jan Hentschel <[email protected]> Signed-off-by: Viraj Jasani <[email protected]>
Signed-off-by: Jan Hentschel <[email protected]> Signed-off-by: Viraj Jasani <[email protected]>
Signed-off-by: Jan Hentschel <[email protected]> Signed-off-by: Viraj Jasani <[email protected]>
|
Thanks a lot for the review and the merges! |
Signed-off-by: Jan Hentschel <[email protected]> Signed-off-by: Viraj Jasani <[email protected]>
Signed-off-by: Jan Hentschel <[email protected]> Signed-off-by: Viraj Jasani <[email protected]>
This reverts commit 975d246. Breaks build.
Signed-off-by: Jan Hentschel <[email protected]> Signed-off-by: Viraj Jasani <[email protected]> (cherry picked from commit bd574ad) Change-Id: I1cd1e05b3dc13455684be864728303086d742ec1
Signed-off-by: Jan Hentschel <[email protected]> Signed-off-by: Viraj Jasani <[email protected]> (cherry picked from commit bd574ad) Change-Id: Iae6341e16adc862ad87cb32c9c8d819e0ef4c78a
add replicationId to RegionMover logic