[
https://issues.apache.org/jira/browse/HBASE-22380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16913328#comment-16913328
]
Wellington Chevreuil commented on HBASE-22380:
----------------------------------------------
{quote}Why the client to pass the clusterId in RPC? The original RS can add the
clusterId into the special WAL cell and thus make it be passed to the next
cluster right?
{quote}
Unlike normal replication, bulkload replication does not send wal edits to the
remote cluster, so there's no other mean to forward the originator cluster id
other than putting it in the bulkload RPC message itself.
{quote}Only passing the original (first) clusterId is enough? What if a flow
like clusterA -> clusterB <-> clusterC ?
{quote}
I haven't implemented such condition in the added test, but the principle is
same for normal replication, only difference is that we filter based on the
message, instead of wal entry, because of the reasons explained above. If the
message already has a clusterId value, [we keep using
it|https://github.com/apache/hbase/blob/b117b55fcb690dc6b2cbeb3d660a2b01ced2cff1/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java#L2371].
If it was empty, [we use the current cluster
id|https://github.com/apache/hbase/blob/b117b55fcb690dc6b2cbeb3d660a2b01ced2cff1/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java#L2373].
And if the message already has a cluster id and this is same as current
cluster, [we break the
cycle|https://github.com/apache/hbase/blob/b117b55fcb690dc6b2cbeb3d660a2b01ced2cff1/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java#L2369].
> break circle replication when doing bulkload
> --------------------------------------------
>
> Key: HBASE-22380
> URL: https://issues.apache.org/jira/browse/HBASE-22380
> Project: HBase
> Issue Type: Bug
> Components: Replication
> Affects Versions: 3.0.0, 1.5.0, 2.2.0, 1.4.10, 2.0.5, 2.3.0, 2.1.5, 1.3.5
> Reporter: chenxu
> Assignee: Wellington Chevreuil
> Priority: Critical
> Labels: bulkload
> Fix For: 3.0.0, 1.5.0, 2.3.0, 1.4.11, 2.1.7, 2.2.2
>
>
> when enabled master-master bulkload replication, HFiles will be replicated
> circularly between two clusters
--
This message was sent by Atlassian Jira
(v8.3.2#803003)