Repository: ignite Updated Branches: refs/heads/master b37f8a207 -> 49a565cee
IGNITE-8798 Move transaction recovery logging to INFO level Signed-off-by: Ivan Rakov <ira...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/49a565ce Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/49a565ce Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/49a565ce Branch: refs/heads/master Commit: 49a565cee5f8bcb890602c493e20cf145bfb5e9b Parents: b37f8a2 Author: ezagumennov <ezagumen...@gridgain.com> Authored: Tue Jun 19 18:04:34 2018 +0300 Committer: Ivan Rakov <ira...@apache.org> Committed: Tue Jun 19 18:04:34 2018 +0300 ---------------------------------------------------------------------- .../distributed/GridCacheTxRecoveryFuture.java | 112 ++++++++++--------- .../cache/transactions/IgniteTxHandler.java | 8 +- .../cache/transactions/IgniteTxManager.java | 20 ++-- 3 files changed, 72 insertions(+), 68 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/49a565ce/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryFuture.java index d6b45b3..3eeb0db 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryFuture.java @@ -120,8 +120,8 @@ public class GridCacheTxRecoveryFuture extends GridCacheCompoundIdentityFuture<B if (node != null) nodes.put(node.id(), node); - else if (log.isDebugEnabled()) - log.debug("Transaction node left (will ignore) " + e.getKey()); + else if (log.isInfoEnabled()) + log.info("Transaction node left (will ignore) " + e.getKey()); } for (UUID nodeId : e.getValue()) { @@ -130,8 +130,8 @@ public class GridCacheTxRecoveryFuture extends GridCacheCompoundIdentityFuture<B if (node != null) nodes.put(node.id(), node); - else if (log.isDebugEnabled()) - log.debug("Transaction node left (will ignore) " + e.getKey()); + else if (log.isInfoEnabled()) + log.info("Transaction node left (will ignore) " + e.getKey()); } } } @@ -179,21 +179,21 @@ public class GridCacheTxRecoveryFuture extends GridCacheCompoundIdentityFuture<B try { cctx.io().send(nearNodeId, req, tx.ioPolicy()); - if (msgLog.isDebugEnabled()) { - msgLog.debug("Recovery fut, sent request near tx [txId=" + tx.nearXidVersion() + - ", dhtTxId=" + tx.xidVersion() + - ", node=" + nearNodeId + ']'); + if (msgLog.isInfoEnabled()) { + msgLog.info("Recovery fut, sent request near tx [txId=" + tx.nearXidVersion() + + ", dhtTxId=" + tx.xidVersion() + + ", node=" + nearNodeId + ']'); } } catch (ClusterTopologyCheckedException ignore) { fut.onNodeLeft(nearNodeId); } catch (IgniteCheckedException e) { - if (msgLog.isDebugEnabled()) { - msgLog.debug("Recovery fut, failed to send request near tx [txId=" + tx.nearXidVersion() + - ", dhtTxId=" + tx.xidVersion() + - ", node=" + nearNodeId + - ", err=" + e + ']'); + if (msgLog.isInfoEnabled()) { + msgLog.info("Recovery fut, failed to send request near tx [txId=" + tx.nearXidVersion() + + ", dhtTxId=" + tx.xidVersion() + + ", node=" + nearNodeId + + ", err=" + e + ']'); } fut.onError(e); @@ -298,21 +298,21 @@ public class GridCacheTxRecoveryFuture extends GridCacheCompoundIdentityFuture<B try { cctx.io().send(id, req, tx.ioPolicy()); - if (msgLog.isDebugEnabled()) { - msgLog.debug("Recovery fut, sent request to backup [txId=" + tx.nearXidVersion() + - ", dhtTxId=" + tx.xidVersion() + - ", node=" + id + ']'); + if (msgLog.isInfoEnabled()) { + msgLog.info("Recovery fut, sent request to backup [txId=" + tx.nearXidVersion() + + ", dhtTxId=" + tx.xidVersion() + + ", node=" + id + ']'); } } catch (ClusterTopologyCheckedException ignored) { fut.onNodeLeft(id); } catch (IgniteCheckedException e) { - if (msgLog.isDebugEnabled()) { - msgLog.debug("Recovery fut, failed to send request to backup [txId=" + tx.nearXidVersion() + - ", dhtTxId=" + tx.xidVersion() + - ", node=" + id + - ", err=" + e + ']'); + if (msgLog.isInfoEnabled()) { + msgLog.info("Recovery fut, failed to send request to backup [txId=" + tx.nearXidVersion() + + ", dhtTxId=" + tx.xidVersion() + + ", node=" + id + + ", err=" + e + ']'); } fut.onError(e); @@ -337,21 +337,21 @@ public class GridCacheTxRecoveryFuture extends GridCacheCompoundIdentityFuture<B try { cctx.io().send(nodeId, req, tx.ioPolicy()); - if (msgLog.isDebugEnabled()) { - msgLog.debug("Recovery fut, sent request to primary [txId=" + tx.nearXidVersion() + - ", dhtTxId=" + tx.xidVersion() + - ", node=" + nodeId + ']'); + if (msgLog.isInfoEnabled()) { + msgLog.info("Recovery fut, sent request to primary [txId=" + tx.nearXidVersion() + + ", dhtTxId=" + tx.xidVersion() + + ", node=" + nodeId + ']'); } } catch (ClusterTopologyCheckedException ignored) { fut.onNodeLeft(nodeId); } catch (IgniteCheckedException e) { - if (msgLog.isDebugEnabled()) { - msgLog.debug("Recovery fut, failed to send request to primary [txId=" + tx.nearXidVersion() + - ", dhtTxId=" + tx.xidVersion() + - ", node=" + nodeId + - ", err=" + e + ']'); + if (msgLog.isInfoEnabled()) { + msgLog.info("Recovery fut, failed to send request to primary [txId=" + tx.nearXidVersion() + + ", dhtTxId=" + tx.xidVersion() + + ", node=" + nodeId + + ", err=" + e + ']'); } fut.onError(e); @@ -398,22 +398,24 @@ public class GridCacheTxRecoveryFuture extends GridCacheCompoundIdentityFuture<B mini.onResult(res); } else { - if (msgLog.isDebugEnabled()) { - msgLog.debug("Tx recovery fut, failed to find mini future [txId=" + tx.nearXidVersion() + + if (msgLog.isInfoEnabled()) { + msgLog.info("Tx recovery fut, failed to find mini future [txId=" + tx.nearXidVersion() + + ", dhtTxId=" + tx.xidVersion() + + ", node=" + nodeId + + ", res=" + res + + ", fut=" + this + ']'); + } + } + } + else { + if (msgLog.isInfoEnabled()) { + msgLog.info("Tx recovery fut, response for finished future [txId=" + tx.nearXidVersion() + ", dhtTxId=" + tx.xidVersion() + ", node=" + nodeId + ", res=" + res + ", fut=" + this + ']'); - } } } - else { - msgLog.debug("Tx recovery fut, response for finished future [txId=" + tx.nearXidVersion() + - ", dhtTxId=" + tx.xidVersion() + - ", node=" + nodeId + - ", res=" + res + - ", fut=" + this + ']'); - } } /** @@ -502,14 +504,16 @@ public class GridCacheTxRecoveryFuture extends GridCacheCompoundIdentityFuture<B } else { if (err instanceof ClusterTopologyCheckedException && nearTxCheck) { - if (log.isDebugEnabled()) - log.debug("Failed to check transaction on near node, " + - "ignoring [err=" + err + ", tx=" + tx + ']'); + if (log.isInfoEnabled()) { + log.info("Failed to check transaction on near node, " + + "ignoring [err=" + err + ", tx=" + tx + ']'); + } } else { - if (log.isDebugEnabled()) - log.debug("Failed to check prepared transactions, " + - "invalidating transaction [err=" + err + ", tx=" + tx + ']'); + if (log.isInfoEnabled()) { + log.info("Failed to check prepared transactions, " + + "invalidating transaction [err=" + err + ", tx=" + tx + ']'); + } cctx.tm().salvageTx(tx); } @@ -577,8 +581,8 @@ public class GridCacheTxRecoveryFuture extends GridCacheCompoundIdentityFuture<B * @param e Error. */ private void onError(Throwable e) { - if (log.isDebugEnabled()) - log.debug("Failed to get future result [fut=" + this + ", err=" + e + ']'); + if (log.isInfoEnabled()) + log.info("Failed to get future result [fut=" + this + ", err=" + e + ']'); onDone(e); } @@ -587,11 +591,11 @@ public class GridCacheTxRecoveryFuture extends GridCacheCompoundIdentityFuture<B * @param nodeId Failed node ID. */ private void onNodeLeft(UUID nodeId) { - if (msgLog.isDebugEnabled()) { - msgLog.debug("Tx recovery fut, mini future node left [txId=" + tx.nearXidVersion() + - ", dhtTxId=" + tx.xidVersion() + - ", node=" + nodeId + - ", nearTxCheck=" + nearTxCheck + ']'); + if (msgLog.isInfoEnabled()) { + msgLog.info("Tx recovery fut, mini future node left [txId=" + tx.nearXidVersion() + + ", dhtTxId=" + tx.xidVersion() + + ", node=" + nodeId + + ", nearTxCheck=" + nearTxCheck + ']'); } if (nearTxCheck) { http://git-wip-us.apache.org/repos/asf/ignite/blob/49a565ce/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java index 44482ab..6bfa1e8 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java @@ -1877,8 +1877,8 @@ public class IgniteTxHandler { * @param res Response. */ protected void processCheckPreparedTxResponse(UUID nodeId, GridCacheTxRecoveryResponse res) { - if (txRecoveryMsgLog.isDebugEnabled()) { - txRecoveryMsgLog.debug("Received tx recovery response [txId=" + res.version() + + if (txRecoveryMsgLog.isInfoEnabled()) { + txRecoveryMsgLog.info("Received tx recovery response [txId=" + res.version() + ", node=" + nodeId + ", res=" + res + ']'); } @@ -1886,8 +1886,8 @@ public class IgniteTxHandler { GridCacheTxRecoveryFuture fut = (GridCacheTxRecoveryFuture)ctx.mvcc().future(res.futureId()); if (fut == null) { - if (txRecoveryMsgLog.isDebugEnabled()) { - txRecoveryMsgLog.debug("Failed to find future for tx recovery response [txId=" + res.version() + + if (txRecoveryMsgLog.isInfoEnabled()) { + txRecoveryMsgLog.info("Failed to find future for tx recovery response [txId=" + res.version() + ", node=" + nodeId + ", res=" + res + ']'); } http://git-wip-us.apache.org/repos/asf/ignite/blob/49a565ce/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java index 86360b6..a30ca04 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java @@ -383,16 +383,16 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter { if (state == ACTIVE || state == PREPARING || state == PREPARED || state == MARKED_ROLLBACK) { if (!tx.markFinalizing(status)) { - if (log.isDebugEnabled()) - log.debug("Will not try to commit invalidate transaction (could not mark finalized): " + tx); + if (log.isInfoEnabled()) + log.info("Will not try to commit invalidate transaction (could not mark finalized): " + tx); return; } tx.salvageTx(); - if (log.isDebugEnabled()) - log.debug("Invalidated transaction because originating node left grid: " + CU.txString(tx)); + if (log.isInfoEnabled()) + log.info("Invalidated transaction because originating node left grid: " + CU.txString(tx)); } } @@ -2012,12 +2012,12 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter { * @param commit Whether transaction should be committed or rolled back. */ public void finishTxOnRecovery(final IgniteInternalTx tx, boolean commit) { - if (log.isDebugEnabled()) - log.debug("Finishing prepared transaction [tx=" + tx + ", commit=" + commit + ']'); + if (log.isInfoEnabled()) + log.info("Finishing prepared transaction [tx=" + tx + ", commit=" + commit + ']'); if (!tx.markFinalizing(RECOVERY_FINISH)) { - if (log.isDebugEnabled()) - log.debug("Will not try to commit prepared transaction (could not mark finalized): " + tx); + if (log.isInfoEnabled()) + log.info("Will not try to commit prepared transaction (could not mark finalized): " + tx); return; } @@ -2057,8 +2057,8 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter { cctx.mvcc().addFuture(fut, fut.futureId()); - if (log.isDebugEnabled()) - log.debug("Checking optimistic transaction state on remote nodes [tx=" + tx + ", fut=" + fut + ']'); + if (log.isInfoEnabled()) + log.info("Checking optimistic transaction state on remote nodes [tx=" + tx + ", fut=" + fut + ']'); fut.prepare(); }