sashapolo commented on code in PR #5568:
URL: https://github.com/apache/ignite-3/pull/5568#discussion_r2028606793


##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/ZonePartitionReplicaListener.java:
##########
@@ -239,10 +239,24 @@ private CompletableFuture<ReplicaResult> 
processTableAwareRequest(
             ReplicaPrimacy replicaPrimacy,
             UUID senderId
     ) {
-        int tableId = ((TableAware) request).tableId();
-
         return 
tableAwareReplicaRequestPreProcessor.preProcessTableAwareRequest(request, 
replicaPrimacy, senderId)
-                .thenCompose(ignored -> replicas.get(tableId).process(request, 
replicaPrimacy, senderId));
+                .thenCompose(ignored -> {
+                    int tableId = ((TableAware) request).tableId();
+
+                    ReplicaTableProcessor replicaProcessor = 
replicaProcessors.get(tableId);
+
+                    if (replicaProcessor == null) {
+                        // Most of the times this condition should be false. 
This logging message is added in case a request got stuck
+                        // somewhere while being replicated and arrived on 
this node after the target table had been removed. In this case
+                        // we ignore the command, which should be safe to do, 
because the underlying storage was destroyed anyway.
+                        LOG.warn("Replica processor for table ID {} not found. 
Command will be ignored: {}", tableId,

Review Comment:
   What do you propose to do? Should we comment this and fail with an NPE for 
now?



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to