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-23322 [hbck2] Simplification on HBCKSCP scheduling #852
Conversation
Signed-off-by: stack <stack@apache.org>
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.
So the PR is messed up with another commit? But anyway, I think we could do better refactoring on the code.
@@ -231,13 +232,13 @@ public static void fullScanTables(Connection connection, final Visitor visitor) | |||
* Callers should call close on the returned {@link Table} instance. | |||
* @param connection connection we're using to access Meta | |||
* @return An {@link Table} for <code>hbase:meta</code> | |||
* @throws NullPointerException if {@code connection} is {@code null} |
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 the intention here should be 'do not pass null connection'?
@@ -83,10 +83,8 @@ public void reset() { | |||
} | |||
|
|||
protected void init() { | |||
Preconditions.checkState(iv != null, "IV is null"); |
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.
IllegalState instead of NPE?
@@ -582,10 +562,7 @@ synchronized long expireServer(final ServerName serverName, | |||
return Procedure.NO_PROC_ID; | |||
} | |||
LOG.info("Processing expiration of " + serverName + " on " + this.master.getServerName()); | |||
long pid = function.apply(serverName); | |||
if (pid <= 0) { |
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.
We do not need this test any more? It will skip the later listener calls.
@@ -1502,26 +1503,38 @@ public long submitServerCrash(ServerName serverName, boolean shouldSplitWal) { | |||
// server state to CRASHED, we will no longer accept the reportRegionStateTransition call from | |||
// this server. This is used to simplify the implementation for TRSP and SCP, where we can make | |||
// sure that, the region list fetched by SCP will not be changed any more. | |||
serverNode.writeLock().lock(); | |||
if (serverNode != null) { |
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'd better extract a special method for handling the unknown server case? It will make the code much cleaner, now lots of serverNode != null in the code base which means the code hard to understand...
💔 -1 overall
This message was automatically generated. |
No description provided.