-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-25206 Data loss can happen if a cloned table loses original spl… #2569
Conversation
This comment has been minimized.
This comment has been minimized.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
Outdated
Show resolved
Hide resolved
They are added by this issue. https://issues.apache.org/jira/browse/HBASE-23187 Let me take a look on the PR about why we add these checks. |
Oh the logic is already there before HBASE-23187. In HBASE-23187 we just add checks for RegionInfo. Let me check for earlier changes. |
Oh it is in HBASE-14614, where the patch is several MB, which means we can not know the actual reason on why the code is like this... If you do not mind, I plan to open an issue first to address the problem of the include method, and then we could come back to fix the bug here. Thanks. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thank you for reviewing this! @Apache9
Sure. Please go ahead. Thanks. |
@@ -100,6 +101,12 @@ protected Flow executeFromState(final MasterProcedureEnv env, DeleteTableState s | |||
// TODO: Move out... in the acquireLock() | |||
LOG.debug("Waiting for RIT for {}", this); | |||
regions = env.getAssignmentManager().getRegionStates().getRegionsOfTable(getTableName()); |
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 think here, we could add a method in RegionStates to get regions of table for disabling, so we do not need to interate on the region state nodes of this table again.
@Apache9 I just modified the patch for your review. Can you please review it when you get a chance? Thanks. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
Let me check the failed UTs. |
…it region(delete table)
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
I don't think the failed UT in the last QA is related to the patch. The UT was successful locally. |
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
…it region(delete table) (#2569) Signed-off-by: Duo Zhang <zhangduo@apache.org>
…it region(delete table) (#2569) Signed-off-by: Duo Zhang <zhangduo@apache.org>
…it region(delete table) (#2569) Signed-off-by: Duo Zhang <zhangduo@apache.org>
@@ -348,6 +348,7 @@ protected Flow executeFromState(MasterProcedureEnv env, RegionStateTransitionSta | |||
LOG.error( | |||
"Cannot assign replica region {} because its primary region {} does not exist.", | |||
regionNode.getRegionInfo(), defaultRI); | |||
regionNode.unsetProcedure(this); |
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.
This is a good catch, moving the region out of RIT.
…it region(delete table) (apache#2569) Signed-off-by: Duo Zhang <zhangduo@apache.org>
…it region(delete table) (apache#2569) Signed-off-by: Duo Zhang <zhangduo@apache.org> (cherry picked from commit da4d639) Change-Id: Ia75c7678d2273b42bfb8b2ed5ca33a612b5ad74c
…it region(delete table)