Uh oh!
There was an error while loading. Please reload this page.
HBASE-23596 HBCKServerCrashProcedure can double assign - #952
Conversation
Apache-HBase
commented
Dec 19, 2019
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Dec 19, 2019
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Dec 20, 2019
💔 -1 overall
This message was automatically generated. |
saintstack
commented
Dec 20, 2019
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. |
Apache-HBase
commented
Dec 20, 2019
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Dec 21, 2019
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Dec 21, 2019
💔 -1 overall
This message was automatically generated. |
saintstack
commented
Dec 21, 2019
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. |
saintstack
commented
Jan 2, 2020
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.
rls would never be null in our case right?
There was a problem hiding this comment.
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.
Above 3 conditions can be combined for continue?
There was a problem hiding this comment.
As is it is an easier read IMO!
saintstack
commented
Jan 2, 2020
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'.
saintstack
commented
Jan 2, 2020
Address @virajjasani review comment |
Apache-HBase
commented
Jan 2, 2020
💔 -1 overall
This message was automatically generated. |
saintstack
commented
Jan 2, 2020
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..... |
saintstack
commented
Jan 2, 2020
Merged by hand to branch-2.2+ |
Apache-HBase
commented
Jan 3, 2020
💔 -1 overall
This message was automatically generated. |
First attempt. Will be back after testing.