tkalkirill commented on code in PR #6362:
URL: https://github.com/apache/ignite-3/pull/6362#discussion_r2251666064
##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/raft/handlers/WriteIntentSwitchCommandHandler.java:
##########
@@ -55,7 +59,17 @@ protected CommandResult handleInternally(
boolean applied = false;
for (int tableId : ((WriteIntentSwitchCommandV2)
switchCommand).tableIds()) {
- CommandResult singleResult = raftTableProcessor(tableId)
+ RaftTableProcessor tableProcessor = raftTableProcessor(tableId);
+
+ if (tableProcessor == null) {
+ // This can only happen if the table in question has already
been dropped and destroyed. In such case, we simply
+ // don't need to do anything as the partition storage is
already destroyed.
+ LOG.debug("Table processor for table ID {} not found. Command
execution for the table will be ignored: {}",
Review Comment:
Maybe we should do logging explicitly with a debug enabled check so that
`switchCommand.toStringForLightLogging()` is not executed in vain.
##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/raft/handlers/WriteIntentSwitchCommandHandler.java:
##########
@@ -65,10 +79,6 @@ protected CommandResult handleInternally(
}
private RaftTableProcessor raftTableProcessor(int tableId) {
Review Comment:
```suggestion
private @Nullable RaftTableProcessor raftTableProcessor(int tableId) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]