-
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-23596 HBCKServerCrashProcedure can double assign #952
Conversation
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.
💔 -1 overall
This message was automatically generated. |
f7a5314
to
16d2c4b
Compare
💔 -1 overall
This message was automatically generated. |
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
💔 -1 overall
This message was automatically generated. |
16d2c4b
to
76c7f3c
Compare
Thanks @binlijin and @Apache9 for +1s. After testing, made a more conservative patch. It will use master context -- the default for SCP -- and the HBCK aspect will only cut in where we read hbase:meta, when master context comes up empty. The latter case will be when operators are trying to fixup corrupted Master state where 'Unknown Servers' have crept into the mix. |
💔 -1 overall
This message was automatically generated. |
76c7f3c
to
a065dd3
Compare
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
Something wonky here. This HBCKSCP is only called via hbck2 (or by its unit test) so no other tests should be failing (and they pass locally). I'm in no hurry to commit this. Still testing so will try figure what is up here. |
a065dd3
to
1a02bea
Compare
Update is yet more conservative than previous only reassigning 'Unknown Servers' if shown as OPEN or OPENING in the hbase:meta table (previous we'd reassign any 'Unknown Server' referenced Region). |
|
||
@Override | ||
public boolean visit(Result result) throws IOException { | ||
RegionLocations rls = MetaTableAccessor.getRegionLocations(result); |
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.
rls would never be null in our case right?
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.
Shouldn't be but let me handle it; when this code is running the hbase:meta could be messed up.
} | ||
if (!hrl.getServerName().equals(this.unknownServerName)) { | ||
continue; | ||
} |
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.
Above 3 conditions can be combined for continue
?
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.
As is it is an easier read IMO!
Thanks for review @virajjasani ... let me update to address your first comment. |
Change its behavior so it will only look in hbase:meta if the call to the super class turns up zero references. Only then will it search hbase:meta for references to 'Unknown Servers'. Normal operation where we read Master context is usual and sufficient. The scan of hbase:meta is only for case where Master state has been corrupted and we need to clear out 'Unknown Servers'.
1a02bea
to
a5197bb
Compare
Address @virajjasani review comment |
💔 -1 overall
This message was automatically generated. |
I'd like to push this on branch-2.3 because what is there currently could cause damage. Since this code only cuts in at an extreme when invoked by an operator via hbck2 and passed a server that has NO references in master memory context, and since I have two +1s for an earlier invocation that was more radical than this, I'm going to push..... |
Merged by hand to branch-2.2+ |
💔 -1 overall
This message was automatically generated. |
First attempt. Will be back after testing.