-
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-24684 Fetch ReplicationSink servers list from HMaster instead o… #2077
Conversation
* @return list of region server addresses or an empty list if the slave is unavailable | ||
*/ | ||
protected static List<ServerName> fetchSlavesAddresses(ZKWatcher zkw) |
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.
Should be compatible with the old ZK impl. Cannot remove them directly?
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.
OK,try new impl firstly and old ZK impl secondly, is that OK?
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
000e874
to
069337f
Compare
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
1 similar comment
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +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.
Since we are relying on the periodic chore run to update the list of available sinks, we might need to handle possible failure if the cached sink is not available anymore. Maybe we should add an extra check to re-fetch the sinks at HBaseInterClusterReplicationEndpoint.replicateEntries, in case the current one fails?
try (Admin admin = getPeerConnection().getAdmin()) { | ||
String version = admin.getClusterMetrics().getHBaseVersion(); | ||
LOG.info("Peer cluster version is {} for peer {}", version, ctx.getPeerId()); | ||
if (Integer.parseInt(version.split("\\.")[0]) >= 3) { |
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.
Would it be interesting to also add a config flag allowing 3+ versions to optionally still use ZK?
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.
Thanks @wchevreuil for reviewing.
ReplicationSinkManager.chooseSinks will be called to re-fetch the sinks when HBaseInterClusterReplicationEndpoint.replicate catches ConnectException or UnknownHostException, It's same as before.
And I've added a config "hbase.replication.fetch.servers.usezk" to optionally still use ZK impl.
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.
ReplicationSinkManager.chooseSinks will be called to re-fetch the sinks when HBaseInterClusterReplicationEndpoint.replicate catches ConnectException or UnknownHostException, It's same as before.
Yeah, haven't looked at the outer catch from replicate. Another thought them is if we really need the new chore? I wonder how effective it would really be to avoid trying stale sinks.
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.
Another thought them is if we really need the new chore? I wonder how effective it would really be to avoid trying stale sinks.
Thank @wchevreuil for thinking about this.
I had a thought, there is some differences between regionServers stored in HBaseReplicationEndpoint and sinks stored in ReplicationSinkManager. The latter is a random part of the former. The new chore can remove abandoned servers and discover new servers. If there is no such chore, new servers can't be sinks unless exceptions happen due to RSs crash.
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…plicationSourceManager (apache#2019) Signed-off-by: Wellington Chevreuil <[email protected]>
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
#2077) Signed-off-by: Wellington Chevreuil <[email protected]>
#2077) Signed-off-by: Wellington Chevreuil <[email protected]>
#2077) Signed-off-by: Wellington Chevreuil <[email protected]>
#2077) Signed-off-by: Wellington Chevreuil <[email protected]>
#2077) Signed-off-by: Wellington Chevreuil <[email protected]>
#2077) Signed-off-by: Wellington Chevreuil <[email protected]>
#2077) Signed-off-by: Wellington Chevreuil <[email protected]>
#2077) Signed-off-by: Wellington Chevreuil <[email protected]>
…f ZooKeeper