Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Patch
Description
There is duplicate code in ReplicationUtils.contains and ReplicationPeerConfig.needToReplicate about deciding whether a table need replicate to the peer cluster.
And the implementation of ReplicationPeerConfig.needToReplicate has a bug, it return false when replicateAllUserTables flag is true and excludeTableCFsMap contains not all of cfs.
We should copy the code from ReplicationUtils.contains to ReplicationPeerConfig.needToReplicate, and delete ReplicationUtils.contains.Because ReplicationUtils is from module replication, ReplicationPeerConfig is from module client, and module replication depends on module client.
In the following code, ReplicationPeerConfig.needToReplicate return false, when replicateAllUserTables flag is true and excludeTableCFsMap contains not all of cfs.
public boolean needToReplicate(TableName table) { if (replicateAllUserTables) { ...... if (excludeTableCFsMap != null && excludeTableCFsMap.containsKey(table)) { return false; } ...... }
Attachments
Attachments
Issue Links
- breaks
-
HBASE-23641 Use ReplicationPeerConfig.needToReplicate in HBaseFsck
- Resolved
- relates to
-
HBASE-23642 Reintroduce ReplicationUtils.contains as deprecated
- Resolved
- links to