|
56 | 56 | import org.apache.ignite.internal.network.InternalClusterNode; |
57 | 57 | import org.apache.ignite.internal.tx.ActiveLocalTxMinimumRequiredTimeProvider; |
58 | 58 | import org.apache.ignite.internal.tx.InternalTransaction; |
| 59 | +import org.apache.ignite.internal.tx.TxManager; |
59 | 60 | import org.apache.ignite.tx.Transaction; |
60 | 61 | import org.apache.ignite.tx.TransactionOptions; |
61 | 62 | import org.awaitility.Awaitility; |
@@ -152,6 +153,7 @@ void testGlobalMinimumTxRequiredTime() { |
152 | 153 | node2.catalogCompactionRunner() |
153 | 154 | ); |
154 | 155 |
|
| 156 | + debug.recordGlobalTxState("init"); |
155 | 157 | debug.recordCatalogState("init"); |
156 | 158 | debug.recordMinTxTimesState("init"); |
157 | 159 |
|
@@ -381,6 +383,21 @@ void recordMinTxTimesState(String contextMessage) { |
381 | 383 | } |
382 | 384 | } |
383 | 385 |
|
| 386 | + void recordGlobalTxState(String contextMessage) { |
| 387 | + buffer.nl(); |
| 388 | + |
| 389 | + buffer.app("System transactions state (").app(contextMessage).app(')').nl(); |
| 390 | + |
| 391 | + for (IgniteImpl node : nodes) { |
| 392 | + TxManager txManager = node.txManager(); |
| 393 | + |
| 394 | + buffer.app(" ").app(node.name()) |
| 395 | + .app(": pending=").app(txManager.pending()) |
| 396 | + .app(", finished=").app(txManager.finished()) |
| 397 | + .nl(); |
| 398 | + } |
| 399 | + } |
| 400 | + |
384 | 401 | void recordTransactionsState() { |
385 | 402 | // Sort by start time. |
386 | 403 | transactions.sort(Comparator.comparing(t -> beginTimestamp(t.id()))); |
@@ -427,6 +444,7 @@ void recordTx(List<InternalTransaction> txs) { |
427 | 444 | } |
428 | 445 |
|
429 | 446 | String dumpDebugInfo(String messageHeader) { |
| 447 | + recordGlobalTxState("onFailure"); |
430 | 448 | recordCatalogState("onFailure"); |
431 | 449 | recordMinTxTimesState("onFailure"); |
432 | 450 | recordTransactionsState(); |
|
0 commit comments