private void attachRegionReplicationToFlushOpSeqIdMVCCEntry(WriteEntry flushOpSeqIdMVCCEntry,
    FlushDescriptor desc, RegionReplicationSink sink) {
    assert !flushOpSeqIdMVCCEntry.getCompletionAction().isPresent();
    WALEdit flushMarkerWALEdit = WALEdit.createFlushWALEdit(getRegionInfo(), desc);
    WALKeyImpl walKey =
      WALUtil.createWALKey(getRegionInfo(), mvcc, this.getReplicationScope(), null);
    walKey.setWriteEntry(flushOpSeqIdMVCCEntry);
    /**
     * Here the {@link ServerCall} is null for {@link RegionReplicationSink#add} because the
     * flushMarkerWALEdit is created by ourselves, not from rpc.
     */
    flushOpSeqIdMVCCEntry.attachCompletionAction(() -> sink.add(walKey, flushMarkerWALEdit, null));
  }
Create {@link WALEdit} for {@link FlushDescriptor} and attach {@link RegionReplicationSink#add}
to the flushOpSeqIdMVCCEntry.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java