Source:
<code>public LogReplicationState processEvent(LogReplicationEvent event) throws IllegalTransitionException { switch (event.getType()) { case SNAPSHOT_SYNC_REQUEST: cancelLogEntrySync("snapshot sync request."); LogReplicationState snapshotSyncState = fsm.getStates().get(LogReplicationStateType.IN_SNAPSHOT_SYNC); snapshotSyncState.setTransitionEventId(event.getEventID()); return snapshotSyncState; case SYNC_CANCEL: if (transitionEventId == event.getMetadata().getRequestId()) { cancelLogEntrySync("sync cancel."); LogReplicationState inSnapshotSyncState = fsm.getStates().get(LogReplicationStateType.IN_SNAPSHOT_SYNC); inSnapshotSyncState.setTransitionEventId(UUID.randomUUID()); return inSnapshotSyncState; } log.warn("Log Entry Sync cancel for eventId {}, but running log entry sync for {}", event.getEventID(), transitionEventId); return this; case REPLICATION_STOP: cancelLogEntrySync("replication being stopped."); return fsm.getStates().get(LogReplicationStateType.INITIALIZED); case REPLICATION_SHUTDOWN: cancelLogEntrySync("replication terminated."); return fsm.getStates().get(LogReplicationStateType.STOPPED); case LOG_ENTRY_SYNC_REPLICATED: if (transitionEventId.equals(event.getMetadata().getRequestId())) { log.debug("Log Entry Sync ACK, update last ack timestamp to {}", event.getMetadata().getLastLogEntrySyncedTimestamp()); fsm.setAckedTimestamp(event.getMetadata().getLastLogEntrySyncedTimestamp()); } <START> break; <END> case LOG_ENTRY_SYNC_CONTINUE: if (event.getMetadata().getRequestId() == transitionEventId) { log.trace("Continuation of log entry sync for {}", event.getEventID()); return this; } else { log.warn("Unexpected log entry sync continue event when in log entry sync state {}.", event.getEventID(), transitionEventId); } default: { log.warn("Unexpected log replication event when in log entry sync state.", event.getType()); } } throw new IllegalTransitionException(event.getType(), getType()); }</code><technical_language>LOG_ENTRY_SYNC_REPLICATED event print error log in FSM consumer. disable error log for this event</technical_language>

Target:
public LogReplicationState processEvent(LogReplicationEvent event) throws IllegalTransitionException { switch (event.getType()) { case SNAPSHOT_SYNC_REQUEST: cancelLogEntrySync("snapshot sync request."); LogReplicationState snapshotSyncState = fsm.getStates().get(LogReplicationStateType.IN_SNAPSHOT_SYNC); snapshotSyncState.setTransitionEventId(event.getEventID()); return snapshotSyncState; case SYNC_CANCEL: if (transitionEventId == event.getMetadata().getRequestId()) { cancelLogEntrySync("sync cancel."); LogReplicationState inSnapshotSyncState = fsm.getStates().get(LogReplicationStateType.IN_SNAPSHOT_SYNC); inSnapshotSyncState.setTransitionEventId(UUID.randomUUID()); return inSnapshotSyncState; } log.warn("Log Entry Sync cancel for eventId {}, but running log entry sync for {}", event.getEventID(), transitionEventId); return this; case REPLICATION_STOP: cancelLogEntrySync("replication being stopped."); return fsm.getStates().get(LogReplicationStateType.INITIALIZED); case REPLICATION_SHUTDOWN: cancelLogEntrySync("replication terminated."); return fsm.getStates().get(LogReplicationStateType.STOPPED); case LOG_ENTRY_SYNC_REPLICATED: if (transitionEventId.equals(event.getMetadata().getRequestId())) { log.debug("Log Entry Sync ACK, update last ack timestamp to {}", event.getMetadata().getLastLogEntrySyncedTimestamp()); fsm.setAckedTimestamp(event.getMetadata().getLastLogEntrySyncedTimestamp()); } break; case LOG_ENTRY_SYNC_CONTINUE: if (event.getMetadata().getRequestId() == transitionEventId) { log.trace("Continuation of log entry sync for {}", event.getEventID()); return this; } else { log.warn("Unexpected log entry sync continue event when in log entry sync state {}.", event.getEventID(), transitionEventId); } default: { log.warn("Unexpected log replication event when in log entry sync state.", event.getType()); break; } } throw new IllegalTransitionException(event.getType(), getType()); }