ibessonov commented on code in PR #5665: URL: https://github.com/apache/ignite-3/pull/5665#discussion_r2049180475
########## modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/NonFatal.java: ########## @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.raft.server.impl; + +import org.apache.ignite.internal.failure.FailureProcessor; + +/** + * Marker interface for exceptions that should not be fed to {@link FailureProcessor}. Its only use-case is tests. Review Comment: `JraftServerImpl` is not in tests, I'm confused ########## modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/ClusterManagementGroupManager.java: ########## @@ -589,7 +591,7 @@ private void onElectedAsLeader(long term) { })) .whenComplete((v, e) -> { if (e != null) { - if (unwrapCause(e) instanceof NodeStoppingException) { + if (hasCause(e, NodeStoppingException.class) || hasCause(e, CancellationException.class)) { Review Comment: I read the javadoc, but still not sure, given that there's a disjunction here. Can it be replaced with the following check? ``` hasCause(e, NodeStoppingException.class, CancellationException.class) ``` ########## modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DataNodesManager.java: ########## @@ -1089,14 +1091,18 @@ private CompletableFuture<Void> msInvokeWithRetry( } }) .whenComplete((v, e) -> { - if (e != null) { + if (e != null && !relatesToNodeStopping(e)) { failureProcessor.process(new FailureContext(e, metaStorageOperation.failureLogMessage())); } }); } }); } + private static boolean relatesToNodeStopping(Throwable e) { + return hasCause(e, NodeStoppingException.class) || hasCause(e, CancellationException.class); Review Comment: Same question here, and in all the other places, I guess -- 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]
