Uh oh!
There was an error while loading. Please reload this page.
HBASE-25700 Enhance znode parent validation when add_peer - #3458
Conversation
Apache-HBase
commented
Jul 3, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 3, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 3, 2021
🎊 +1 overall
This message was automatically generated. |
Apache9
commented
Jul 3, 2021
I'm not sure whether we allow a null clusterKey? The region replica feature needs intra cluster replication? The feature does not use this class? |
mokai87
commented
Jul 3, 2021
The cluster key must no be null. I have met a problem in master-slave cluster replication, user misconfigured the cluster key like CLUSTER_KEY => "zk1.com:2181:/hbase " . the znode parent was end with a blank. We did not validate it when add peer, but it will cause enable_table_replication failed. |
Apache9
commented
Jul 4, 2021
You could see the code in ReplicationPeerManager Only if the endpoint is HBaseInterClusterReplicationEndpoint we will check the peer config. Buy anyway, I think it is fine to check null here as if you need the clusterKey to be null, just do not call this method. Please add some javadoc for the methdo to mention that you should not call it with null value, if you want to it to be null, just do not call this method. Thanks. |
mokai87
commented
Jul 4, 2021
I think it is enough to trim the cluster key when it's not null. |
Apache-HBase
commented
Jul 4, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 4, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 4, 2021
💔 -1 overall
This message was automatically generated. |
NPE will still occur while excuting ZKConfig#transformClusterKey() during cluster key validation.
pankaj72981
commented
Jul 5, 2021
IMO we should not allow empty cluster key when endpoint is HBaseInterClusterReplicationEndpoint. WDYT @Apache9 |
Apache9
commented
Jul 5, 2021
We have this check logic in ReplicationPeerManager. |
Apache9
commented
Jul 5, 2021
Oh, I think this is a bad case for spotbugs, but let's fix the pattern to not trigger the spotbugs warning? Maybe just write |
mokai87
commented
Jul 5, 2021
OK, I will update it. |
pankaj72981
commented
Jul 5, 2021
Just went throug the AddPeerProcedure.. AddPeerProcedure#prePeerModification In the transformClusterKey(), we access key without any validation, so here we may faceNPE. |
Apache-HBase
commented
Jul 5, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 5, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 5, 2021
💔 -1 overall
This message was automatically generated. |
mokai87
left a comment
There was a problem hiding this comment.
Update for findbus check issue.
Apache-HBase
commented
Jul 6, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 6, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 6, 2021
🎊 +1 overall
This message was automatically generated. |
pankaj72981
commented
Jul 6, 2021
OK, We are ensuring cluster key wont be NULL in ReplicationPeerConfigUtil#convert(ReplicationPeerConfig). So we are good here.. |
pankaj72981
commented
Jul 6, 2021
@mokai87 Do you mind adding UT for this change? |
mokai87
commented
Jul 6, 2021
No problem. |
Apache-HBase
commented
Jul 6, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 6, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 6, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 7, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 7, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 7, 2021
🎊 +1 overall
This message was automatically generated. |
Apache9
commented
Jul 8, 2021
Please fix the checkstyle issues then I will merge it. Thanks. |
Apache-HBase
commented
Jul 8, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 8, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 8, 2021
🎊 +1 overall
This message was automatically generated. |
mokai87
commented
Jul 9, 2021
|
Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Pankaj Kumar <pankajkumar@apache.org>
No description provided.