[ 
https://issues.apache.org/jira/browse/IGNITE-24573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vyacheslav Koptilin updated IGNITE-24573:
-----------------------------------------
    Environment:     (was: It is worth introducing a common interface for raft 
command handlers used by `PartitionListener` and `ZonePartitionListener` 
classes.

That will allow us to remove the following ugly code:
{noformat}
if (command instanceof UpdateCommand) {
    result = handleUpdateCommand((UpdateCommand) command, commandIndex, 
commandTerm, safeTimestamp);
} else if (command instanceof UpdateAllCommand) {
    result = handleUpdateAllCommand((UpdateAllCommand) command, commandIndex, 
commandTerm, safeTimestamp);
} else if (command instanceof FinishTxCommand) {
    result = finishTxCommandHandler.handle((FinishTxCommand) command, 
commandIndex, commandTerm);
} else if (command instanceof WriteIntentSwitchCommand) {
    result = handleWriteIntentSwitchCommand((WriteIntentSwitchCommand) command, 
commandIndex, commandTerm);
} else if (command instanceof SafeTimeSyncCommand) {
    result = handleSafeTimeSyncCommand((SafeTimeSyncCommand) command, 
commandIndex, commandTerm);
} else if (command instanceof BuildIndexCommand) {
    result = handleBuildIndexCommand((BuildIndexCommand) command, commandIndex, 
commandTerm);
} else if (command instanceof PrimaryReplicaChangeCommand) {
    result = handlePrimaryReplicaChangeCommand((PrimaryReplicaChangeCommand) 
command, commandIndex, commandTerm);
} else if (command instanceof VacuumTxStatesCommand) {
    result = handleVacuumTxStatesCommand((VacuumTxStatesCommand) command, 
commandIndex, commandTerm);
} else if (command instanceof UpdateMinimumActiveTxBeginTimeCommand) {
    result = 
minimumActiveTxTimeCommandHandler.handle((UpdateMinimumActiveTxBeginTimeCommand)
 command, commandIndex);
} else {
    throw new AssertionError("Unknown command type [command=" + 
command.toStringForLightLogging() + ']');
}
{noformat})

> Introduce a new common interface for raft command handlers
> ----------------------------------------------------------
>
>                 Key: IGNITE-24573
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24573
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Vyacheslav Koptilin
>            Assignee: Vyacheslav Koptilin
>            Priority: Major
>              Labels: ignite-3
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to