Cyrill commented on code in PR #3831: URL: https://github.com/apache/ignite-3/pull/3831#discussion_r1618312296
########## modules/table/src/testFixtures/java/org/apache/ignite/internal/table/TxAbstractTest.java: ########## @@ -477,6 +503,70 @@ private InternalTransaction deleteUpsertAll() { return tx; } + private void checkIfNull(Tuple res1, Function<Transaction, Tuple> retryFunc) { + if (res1 != null) { + return; + } + + logger().error("Found null value after upsertAll."); + + printDebugInfo(); + + var resExplicit = igniteTransactions.runInTransaction(retryFunc); + + logger().info("Same explicit call resulted in {} value", resExplicit); + + fail("Found null value after upsertAll."); + } + + private void printDebugInfo() { + logger().info("Primary node for accounts table is [nodeName={}]", primaryNode(accounts)); + logger().info("Cluster times:"); + long latestTime = IgniteTestUtils.getFieldValue(txTestCluster.clientClock(), HybridClockImpl.class, "latestTime"); + logger().info("Client clock [time={}]", HybridTimestamp.hybridTimestamp(latestTime)); + + txTestCluster.clocks().forEach((name, hybridClock) -> { + long time = IgniteTestUtils.getFieldValue(hybridClock, HybridClockImpl.class, "latestTime"); + logger().info( + "Cluster clock [cluster_name={}, time={}]", + name, + HybridTimestamp.hybridTimestamp(time) + ); + } + ); + logger().info("Replica info:"); + txTestCluster.replicaManagers().forEach((name, replicaManager) -> { + + ConcurrentHashMap<ReplicationGroupId, CompletableFuture<Replica>> replicas = + IgniteTestUtils.getFieldValue(replicaManager, ReplicaManager.class, "replicas"); + replicas.forEach((replicationGroupId, replicaCompletableFuture) -> + printReplicaInfo(name, replicationGroupId, replicaCompletableFuture) + ); + }); + } + + private void printReplicaInfo(String name, ReplicationGroupId replicationGroupId, CompletableFuture<Replica> replicaCompletableFuture) { + Replica replica; + try { + replica = replicaCompletableFuture.get(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + + PartitionReplicaListener listener = IgniteTestUtils.getFieldValue(replica, Replica.class, "listener"); + TestMvPartitionStorage storage = IgniteTestUtils.getFieldValue(listener, PartitionReplicaListener.class, "mvDataStorage"); Review Comment: done -- 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