-
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-22923 min version of RegionServer to move system table regions #3438
Conversation
💔 -1 overall
This message was automatically generated. |
* "hbase.min.version.move.system.tables" as "2.0.0". | ||
* When operator uses this config, it should be used with care, meaning | ||
* we should be confident that even if user table regions come to RS with | ||
* higher version (that rest of cluster), it would not cause any |
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 language here is ambiguous. Better to say something like
When the operator uses this configuration option, any version between the current version and the new value of "hbase.min.version.move.system.tables" does not trigger any region movement. It is assumed the configured range of versions do not require special handling.
This should also be committed to all branches, not just branch-1, for consistent functionality across all future releasing versions.
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.
* | ||
* @return List of Excluded servers for System table regions. | ||
*/ | ||
private List<ServerName> getExcludedServersForSystemTableUnlessAllowed() { |
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.
Can we club the logic of both the methods and pass an optional boolean for version check?
The two functions that look very much alike except for the tail part.
Also, the "localhost" part is suspicious, why does AM look for a localhost address? |
It is
And it is
and similar logic is available few other places in |
if (checkForMinVersion) { | ||
if (!DEFAULT_MIN_VERSION_MOVE_SYS_TABLES_CONFIG.equals(minVersionToMoveSysTables)) { |
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.
super nit: club the conditions
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.
Since the argument checkForMinVersion
controls this specific flow, I thought keeping it this way would make it more readable. Thought?
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 don't have a strong opinion. If you ask me, I like the following version but its subjective. I'm fine with whatever you think is good.
checkForMinVersion = checkForMinVersion && !DEFAULT_MIN_VERSION_MOVE_SYS_TABLES_CONFIG.equals(minVersionToMoveSysTables);
if (checkForMinVersion) {
,,,,
}
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.
Love these discussions, always learn a thing or two :)
decisionFactor = decisionFactor && additionalFactors
yeah, this is also nice way. I wish we had some standards around this.
For now, let me keep it as is as you don't have strong opinion, I still find this simpler from readability viewpoint:
if (decisionFactor) {
if (additionalFactors) {
}
}
I think this is why we don't have standards because individuals find different approaches as simpler ones than others (but CPU doesn't care :) )
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
…3439) (#3438) Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Bharath Vissapragada <[email protected]>
…3439) (#3438) Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Bharath Vissapragada <[email protected]>
…3439) (#3438) Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Bharath Vissapragada <[email protected]>
…3439) (#3438) Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Bharath Vissapragada <[email protected]>
No description provided.