Skip to content

Commit b90e6b4

Browse files
EgorKutsEgor Kuts
andauthored
IGNITE-28505 Prevent log flooding caused by TX operations when a node… (#7968)
Co-authored-by: Egor Kuts <i@ekuts.ru>
1 parent 4ef09c3 commit b90e6b4

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/handlers/TxCleanupRecoveryRequestHandler.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@
3131
import java.util.concurrent.CopyOnWriteArrayList;
3232
import org.apache.ignite.internal.failure.FailureContext;
3333
import org.apache.ignite.internal.failure.FailureProcessor;
34+
import org.apache.ignite.internal.lang.ComponentStoppingException;
3435
import org.apache.ignite.internal.lang.IgniteBiTuple;
3536
import org.apache.ignite.internal.lang.IgniteInternalException;
37+
import org.apache.ignite.internal.lang.NodeStoppingException;
3638
import org.apache.ignite.internal.logger.IgniteLogger;
3739
import org.apache.ignite.internal.logger.IgniteThrottledLogger;
3840
import org.apache.ignite.internal.logger.Loggers;
@@ -156,13 +158,13 @@ private CompletableFuture<?> callCleanup(TxMeta txMeta, UUID txId) {
156158
txMeta.commitTimestamp(),
157159
txId
158160
).exceptionally(throwable -> {
159-
throttledLog.warn(
160-
"Failed to cleanup transaction",
161-
"Failed to cleanup transaction {}.",
162-
throwable,
163-
formatTxInfo(txId, txManager)
164-
);
165-
161+
if (!hasCause(throwable, NodeStoppingException.class) && !hasCause(throwable, ComponentStoppingException.class)) {
162+
throttledLog.warn(
163+
"Failed to cleanup transaction",
164+
"Failed to cleanup transaction {}.",
165+
throwable,
166+
formatTxInfo(txId, txManager));
167+
}
166168
return null;
167169
});
168170
}

0 commit comments

Comments
 (0)