[
https://issues.apache.org/jira/browse/HBASE-20424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16471863#comment-16471863
]
Duo Zhang commented on HBASE-20424:
-----------------------------------
Talked with [~zghaobac] offline, the basic idea is:
1. When splitting wals, we need to copy the wals which are ended with
'.syncrep' to the remote wal directory if we are in A state. If it is not
possible then the split will fail.
2. If we are transiting to DA, then give up copying and split the wals in the
normal way.
3. If we are transiting to S, then the remote cluster should have been
transited from S to DA, so
a. When transiting from S to DA, we will make a snapshot of the current
remote wals(actually we only need the name). For example, for peer '1', we
first rename the directory to '1-replay', and finally rename it to '1-snapshot'.
b. When transiting to S, we will check the snapshot directory on the remote
cluster, the wals which are placed in the directory will be skipped when
splitting. This is because that we know these wals will be replicated back to
us.
c. When transiting to S, we need to confirm that there is no wal ended with
'.syncrep' under the wal directory or being splitting(under the old wal
directory is allowed, although it will also be deleted soon). This is used to
make sure we do not replay the wals which are replayed at the remote cluster
when transiting from S to DA.
> Allow writing WAL to local and remote cluster concurrently
> ----------------------------------------------------------
>
> Key: HBASE-20424
> URL: https://issues.apache.org/jira/browse/HBASE-20424
> Project: HBase
> Issue Type: Sub-task
> Reporter: Duo Zhang
> Priority: Major
>
> For better performance.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)