You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2023/01/04 17:54:32 UTC

[GitHub] [hbase] apurtell commented on a diff in pull request #4924: HBASE-27529 Attach WAL extended attributes to mutations at replication sink

apurtell commented on code in PR #4924:
URL: https://github.com/apache/hbase/pull/4924#discussion_r1061745477


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java:
##########
@@ -107,6 +107,14 @@ public class ReplicationSink {
   private SourceFSConfigurationProvider provider;
   private WALEntrySinkFilter walEntrySinkFilter;
 
+  /**
+   * If enabled at sink cluster site config, extended WAL attributes would be attached as Mutation
+   * attributes. This is useful for source cluster coproc to provide coproc specific metadata as WAL
+   * annotations and have them attached back to Mutations generated from WAL entries at sink side.
+   */
+  public static final String HBASE_REPLICATION_SINK_ATTRIBUTES_WAL_TO_MUTATIONS =

Review Comment:
   This doesn't need to be configurable. Mutation attributes will be ignored if they are not expected so this is harmless to clients. And IMHO the right thing to be doing. I agree with your premise.



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java:
##########
@@ -265,6 +273,11 @@ public void replicateEntries(List<WALEntry> entries, final CellScanner cells,
               mutation.setClusterIds(clusterIds);
               mutation.setAttribute(ReplicationUtils.REPLICATION_ATTR_NAME,
                 HConstants.EMPTY_BYTE_ARRAY);
+              if (this.conf.getBoolean(HBASE_REPLICATION_SINK_ATTRIBUTES_WAL_TO_MUTATIONS, false)) {

Review Comment:
   Does not need to be conditional behavior.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org