Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-23345

Table need to replication unless all of cfs are excluded

    XMLWordPrintableJSON

    Details

    • Flags:
      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

        1. HBASE-23345.branch-2.002.patch
          46 kB
          Guanghao Zhang
        2. HBASE-23345.branch-2.002.patch
          46 kB
          Sun Xin
        3. HBASE-23345.branch-2.001.patch
          46 kB
          Sun Xin

          Issue Links

            Activity

              People

              • Assignee:
                Ddupg Sun Xin
                Reporter:
                Ddupg Sun Xin
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: