private void attachRegionReplicationInWALAppend(BatchOperation<?> batchOp,
    MiniBatchOperationInProgress<Mutation> miniBatchOp, WALKeyImpl walKey, WALEdit walEdit,
    WriteEntry writeEntry) {
    if (!regionReplicationSink.isPresent()) {
      return;
    }
    /**
     * If {@link HRegion#regionReplicationSink} is present,only {@link MutationBatchOperation} is
     * used and {@link NonceKey} is all the same for {@link Mutation}s in
     * {@link MutationBatchOperation},so for HBASE-26993 case 1,if
     * {@link MiniBatchOperationInProgress#getWalEditForReplicateSkipWAL} is not null and we could
     * enter {@link HRegion#doWALAppend},that means partial {@link Mutation}s are
     * {@link Durability#SKIP_WAL}, we use
     * {@link MiniBatchOperationInProgress#getWalEditForReplicateSkipWAL} to replicate to region
     * replica,but if {@link MiniBatchOperationInProgress#getWalEditForReplicateSkipWAL} is
     * null,that means there is no {@link Mutation} is {@link Durability#SKIP_WAL},so we just use
     * walEdit to replicate.
     */
    assert batchOp instanceof MutationBatchOperation;
    WALEdit walEditToUse = miniBatchOp.getWalEditForReplicateIfExistsSkipWAL();
    if (walEditToUse == null) {
      walEditToUse = walEdit;
    }
    doAttachReplicateRegionReplicaAction(walKey, walEditToUse, writeEntry);
  }
Attach {@link RegionReplicationSink#add} to the mvcc writeEntry for replicating to region
replica.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java