Source:
<code>public LogReplicationEntry receive(LogReplicationEntry message) { rxMessageCounter++; rxMessageCount.setValue(rxMessageCounter); log.debug("Sink manager received while in {}", message.getMetadata().getMessageMetadataType(), rxState); if (message.getMetadata().getTopologyConfigId() != topologyConfigId) { log.trace("Sink manager with config id ignored msg id {}", topologyConfigId, message.getMetadata().getTopologyConfigId()); return null; } if (message.getMetadata().getMessageMetadataType().equals(MessageType.SNAPSHOT_START)) { log.info("onSnapshotSyncStart :: {}", snapshotSyncPlugin.getClass().getSimpleName()); snapshotSyncPlugin.onSnapshotSyncStart(); processSnapshotStart(message); return null; } if (!receivedValidMessage(message)) { END ACK message and END message again, but the receiver has already transited to if (message.getMetadata().getMessageMetadataType() == SNAPSHOT_END) { LogReplicationEntryMetadata metadata = snapshotSinkBufferManager.makeAckMessage(message); if (metadata.getMessageMetadataType() == SNAPSHOT_END) { log.warn("Sink Manager in state and received message {}. Resending the ACK for SNAPSHOT_END.", rxState, message.getMetadata()); return new LogReplicationEntry(metadata, new byte[0]); } } log.warn("Sink Manager in state and received message {}. Dropping Message.", rxState, message.getMetadata()); return null; } if (rxState.equals(RxState.LOG_ENTRY_SYNC)) { return logEntrySinkBufferManager.processMsgAndBuffer(message); } else { LogReplicationEntry ack = snapshotSinkBufferManager.processMsgAndBuffer(message); if (message.getMetadata().getMessageMetadataType() == SNAPSHOT_END) { <START> snapshotSyncPlugin.onSnapshotSyncEnd(); <END> } return ack; } }</code><technical_language>receiving snapshot_end, applySnapshotSync applies entries of shadow streams. want move callback end there</technical_language>

Target:
public LogReplicationEntry receive(LogReplicationEntry message) { rxMessageCounter++; rxMessageCount.setValue(rxMessageCounter); log.debug("Sink manager received while in {}", message.getMetadata().getMessageMetadataType(), rxState); if (message.getMetadata().getTopologyConfigId() != topologyConfigId) { log.trace("Sink manager with config id ignored msg id {}", topologyConfigId, message.getMetadata().getTopologyConfigId()); return null; } if (message.getMetadata().getMessageMetadataType().equals(MessageType.SNAPSHOT_START)) { if (isValidSnapshotStart(message)) { processSnapshotStart(message); log.info("onSnapshotSyncStart :: {}", snapshotSyncPlugin.getClass().getSimpleName()); snapshotSyncPlugin.onSnapshotSyncStart(runtime); } return null; } if (!receivedValidMessage(message)) { END ACK message and END message again, but the receiver has already transited to if (message.getMetadata().getMessageMetadataType() == SNAPSHOT_END) { LogReplicationEntryMetadata metadata = snapshotSinkBufferManager.makeAckMessage(message); if (metadata.getMessageMetadataType() == SNAPSHOT_END) { log.warn("Sink Manager in state and received message {}. Resending the ACK for SNAPSHOT_END.", rxState, message.getMetadata()); return new LogReplicationEntry(metadata); } } log.warn("Sink Manager in state and received message {}. Dropping Message.", rxState, message.getMetadata()); return null; } return processReceivedMessage(message); }