This is an automated email from the ASF dual-hosted git repository.

sanpwc pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new b37b538100 IGNITE-23524 Remove clock in favour of clockService in 
TableManager (#4616)
b37b538100 is described below

commit b37b5381004cb52346f0916c47fb1113ce456c13
Author: Alexander Lapin <[email protected]>
AuthorDate: Wed Oct 23 15:51:50 2024 +0300

    IGNITE-23524 Remove clock in favour of clockService in TableManager (#4616)
---
 .../replicator/ItReplicaLifecycleTest.java         |  3 --
 .../runner/app/ItIgniteNodeRestartTest.java        |  1 -
 .../org/apache/ignite/internal/app/IgniteImpl.java |  1 -
 .../exec/rel/TableScanNodeExecutionTest.java       | 18 ++++++--
 .../rebalance/ItRebalanceDistributedTest.java      |  1 -
 .../ignite/internal/table/ItColocationTest.java    |  2 +-
 .../internal/table/distributed/TableManager.java   |  8 +---
 .../distributed/storage/InternalTableImpl.java     | 52 +++++++++++-----------
 .../distributed/TableManagerRecoveryTest.java      |  1 -
 .../table/distributed/TableManagerTest.java        |  1 -
 .../storage/InternalTableEstimatedSizeTest.java    |  2 +-
 .../distributed/storage/InternalTableImplTest.java |  6 +--
 .../apache/ignite/distributed/ItTxTestCluster.java |  2 +-
 .../table/impl/DummyInternalTableImpl.java         |  2 +-
 14 files changed, 50 insertions(+), 50 deletions(-)

diff --git 
a/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItReplicaLifecycleTest.java
 
b/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItReplicaLifecycleTest.java
index 9f5791516c..142858eeec 100644
--- 
a/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItReplicaLifecycleTest.java
+++ 
b/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItReplicaLifecycleTest.java
@@ -1295,8 +1295,6 @@ public class ItReplicaLifecycleTest extends 
BaseIgniteAbstractTest {
             StorageUpdateConfiguration storageUpdateConfiguration = 
clusterConfigRegistry
                     
.getConfiguration(StorageUpdateExtensionConfiguration.KEY).storageUpdate();
 
-            HybridClockImpl clock = new HybridClockImpl();
-
             MinimumRequiredTimeCollectorService minTimeCollectorService = new 
MinimumRequiredTimeCollectorServiceImpl();
 
             tableManager = new TableManager(
@@ -1319,7 +1317,6 @@ public class ItReplicaLifecycleTest extends 
BaseIgniteAbstractTest {
                     threadPoolsManager.tableIoExecutor(),
                     threadPoolsManager.partitionOperationsExecutor(),
                     rebalanceScheduler,
-                    clock,
                     clockService,
                     new 
OutgoingSnapshotsManager(clusterService.messagingService()),
                     distributionZoneManager,
diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
index 25f2995a08..137e12b0cc 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
@@ -715,7 +715,6 @@ public class ItIgniteNodeRestartTest extends 
BaseIgniteRestartTest {
                 threadPoolsManager.tableIoExecutor(),
                 threadPoolsManager.partitionOperationsExecutor(),
                 rebalanceScheduler,
-                hybridClock,
                 clockService,
                 new OutgoingSnapshotsManager(clusterSvc.messagingService()),
                 distributionZoneManager,
diff --git 
a/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java 
b/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
index 23349654fc..ce579ed2ef 100644
--- 
a/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
+++ 
b/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
@@ -979,7 +979,6 @@ public class IgniteImpl implements Ignite {
                 threadPoolsManager.tableIoExecutor(),
                 threadPoolsManager.partitionOperationsExecutor(),
                 rebalanceScheduler,
-                clock,
                 clockService,
                 outgoingSnapshotsManager,
                 distributionZoneManager,
diff --git 
a/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/rel/TableScanNodeExecutionTest.java
 
b/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/rel/TableScanNodeExecutionTest.java
index 8f20a234e2..9334ed4e55 100644
--- 
a/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/rel/TableScanNodeExecutionTest.java
+++ 
b/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/rel/TableScanNodeExecutionTest.java
@@ -178,7 +178,13 @@ public class TableScanNodeExecutionTest extends 
AbstractExecutionTest<Object[]>
 
             closeables.add(() -> assertThat(txManager.stopAsync(new 
ComponentContext()), willCompleteSuccessfully()));
 
-            TestInternalTableImpl internalTable = new 
TestInternalTableImpl(replicaSvc, size, timestampTracker, txManager);
+            TestInternalTableImpl internalTable = new TestInternalTableImpl(
+                    replicaSvc,
+                    size,
+                    timestampTracker,
+                    txManager,
+                    clockService
+            );
 
             TableRowConverter rowConverter = new TableRowConverter() {
                 @Override
@@ -238,7 +244,13 @@ public class TableScanNodeExecutionTest extends 
AbstractExecutionTest<Object[]>
 
         private final CountDownLatch scanComplete = new CountDownLatch(1);
 
-        TestInternalTableImpl(ReplicaService replicaSvc, int dataAmount, 
HybridTimestampTracker timestampTracker, TxManager txManager) {
+        TestInternalTableImpl(
+                ReplicaService replicaSvc,
+                int dataAmount,
+                HybridTimestampTracker timestampTracker,
+                TxManager txManager,
+                ClockService clockService
+        ) {
             super(
                     "test",
                     1,
@@ -248,7 +260,7 @@ public class TableScanNodeExecutionTest extends 
AbstractExecutionTest<Object[]>
                     mock(MvTableStorage.class),
                     mock(TxStateTableStorage.class),
                     replicaSvc,
-                    mock(HybridClock.class),
+                    clockService,
                     timestampTracker,
                     mock(PlacementDriver.class),
                     mock(TransactionInflights.class),
diff --git 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java
 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java
index b9776df3b8..aba421593c 100644
--- 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java
+++ 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java
@@ -1421,7 +1421,6 @@ public class ItRebalanceDistributedTest extends 
BaseIgniteAbstractTest {
                     threadPoolsManager.tableIoExecutor(),
                     threadPoolsManager.partitionOperationsExecutor(),
                     rebalanceScheduler,
-                    clock,
                     clockService,
                     new 
OutgoingSnapshotsManager(clusterService.messagingService()),
                     distributionZoneManager,
diff --git 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItColocationTest.java
 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItColocationTest.java
index 63ef0587c4..fc12949c07 100644
--- 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItColocationTest.java
+++ 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItColocationTest.java
@@ -287,7 +287,7 @@ public class ItColocationTest extends 
BaseIgniteAbstractTest {
                 mock(MvTableStorage.class),
                 new TestTxStateTableStorage(),
                 replicaService,
-                new HybridClockImpl(),
+                clockService,
                 observableTimestampTracker,
                 new TestPlacementDriver(clusterNode),
                 transactionInflights,
diff --git 
a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
 
b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
index 189946c6b8..2ea68705b8 100644
--- 
a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
+++ 
b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
@@ -114,7 +114,6 @@ import 
org.apache.ignite.internal.distributionzones.rebalance.PartitionMover;
 import 
org.apache.ignite.internal.distributionzones.rebalance.RebalanceRaftGroupEventsListener;
 import org.apache.ignite.internal.distributionzones.rebalance.RebalanceUtil;
 import org.apache.ignite.internal.hlc.ClockService;
-import org.apache.ignite.internal.hlc.HybridClock;
 import org.apache.ignite.internal.hlc.HybridTimestamp;
 import org.apache.ignite.internal.lang.ByteArray;
 import org.apache.ignite.internal.lang.IgniteInternalException;
@@ -333,8 +332,6 @@ public class TableManager implements IgniteTablesInternal, 
IgniteComponent {
      */
     private final ExecutorService ioExecutor;
 
-    private final HybridClock clock;
-
     private final ClockService clockService;
 
     private final OutgoingSnapshotsManager outgoingSnapshotsManager;
@@ -445,6 +442,7 @@ public class TableManager implements IgniteTablesInternal, 
IgniteComponent {
      * @param partitionOperationsExecutor Striped executor on which partition 
operations (potentially requiring I/O with storages)
      *     will be executed.
      * @param rebalanceScheduler Executor for scheduling rebalance routine.
+     * @param clockService hybrid logical clock service.
      * @param placementDriver Placement driver.
      * @param sql A supplier function that returns {@link IgniteSql}.
      * @param lowWatermark Low watermark.
@@ -472,7 +470,6 @@ public class TableManager implements IgniteTablesInternal, 
IgniteComponent {
             ExecutorService ioExecutor,
             Executor partitionOperationsExecutor,
             ScheduledExecutorService rebalanceScheduler,
-            HybridClock clock,
             ClockService clockService,
             OutgoingSnapshotsManager outgoingSnapshotsManager,
             DistributionZoneManager distributionZoneManager,
@@ -500,7 +497,6 @@ public class TableManager implements IgniteTablesInternal, 
IgniteComponent {
         this.ioExecutor = ioExecutor;
         this.partitionOperationsExecutor = partitionOperationsExecutor;
         this.rebalanceScheduler = rebalanceScheduler;
-        this.clock = clock;
         this.clockService = clockService;
         this.outgoingSnapshotsManager = outgoingSnapshotsManager;
         this.distributionZoneManager = distributionZoneManager;
@@ -1543,7 +1539,7 @@ public class TableManager implements 
IgniteTablesInternal, IgniteComponent {
                 tableStorage,
                 txStateStorage,
                 replicaSvc,
-                clock,
+                clockService,
                 observableTimestampTracker,
                 executorInclinedPlacementDriver,
                 transactionInflights,
diff --git 
a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java
 
b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java
index 7bd7442b1f..40057d593b 100644
--- 
a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java
+++ 
b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java
@@ -78,7 +78,7 @@ import java.util.function.BiPredicate;
 import java.util.function.Function;
 import java.util.function.Supplier;
 import org.apache.ignite.internal.binarytuple.BinaryTupleReader;
-import org.apache.ignite.internal.hlc.HybridClock;
+import org.apache.ignite.internal.hlc.ClockService;
 import org.apache.ignite.internal.hlc.HybridTimestamp;
 import org.apache.ignite.internal.lang.IgniteBiTuple;
 import org.apache.ignite.internal.lang.IgnitePentaFunction;
@@ -182,8 +182,8 @@ public class InternalTableImpl implements InternalTable {
     /** Mutex for the partition maps update. */
     private final Object updatePartitionMapsMux = new Object();
 
-    /** A hybrid logical clock. */
-    private final HybridClock clock;
+    /** A hybrid logical clock service. */
+    private final ClockService clockService;
 
     /** Observable timestamp tracker. */
     private final HybridTimestampTracker observableTimestampTracker;
@@ -214,7 +214,7 @@ public class InternalTableImpl implements InternalTable {
      * @param tableStorage Table storage.
      * @param txStateStorage Transaction state storage.
      * @param replicaSvc Replica service.
-     * @param clock A hybrid logical clock.
+     * @param clockService A hybrid logical clock service.
      * @param placementDriver Placement driver.
      * @param transactionInflights Transaction inflights.
      * @param implicitTransactionTimeout Implicit transaction timeout.
@@ -229,7 +229,7 @@ public class InternalTableImpl implements InternalTable {
             MvTableStorage tableStorage,
             TxStateTableStorage txStateStorage,
             ReplicaService replicaSvc,
-            HybridClock clock,
+            ClockService clockService,
             HybridTimestampTracker observableTimestampTracker,
             PlacementDriver placementDriver,
             TransactionInflights transactionInflights,
@@ -246,7 +246,7 @@ public class InternalTableImpl implements InternalTable {
         this.tableStorage = tableStorage;
         this.txStateStorage = txStateStorage;
         this.replicaSvc = replicaSvc;
-        this.clock = clock;
+        this.clockService = clockService;
         this.observableTimestampTracker = observableTimestampTracker;
         this.placementDriver = placementDriver;
         this.transactionInflights = transactionInflights;
@@ -543,7 +543,7 @@ public class InternalTableImpl implements InternalTable {
                 (enlistmentConsistencyToken) -> 
TABLE_MESSAGES_FACTORY.readWriteScanRetrieveBatchReplicaRequest()
                         .groupId(serializeTablePartitionId(partGroupId))
                         .tableId(tableId)
-                        .timestamp(clock.now())
+                        .timestamp(clockService.now())
                         .transactionId(tx.id())
                         .scanId(scanId)
                         .indexToUse(indexId)
@@ -837,7 +837,7 @@ public class InternalTableImpl implements InternalTable {
     private <R> CompletableFuture<R> postEvaluate(CompletableFuture<R> fut, 
InternalTransaction tx) {
         return fut.handle((BiFunction<R, Throwable, CompletableFuture<R>>) (r, 
e) -> {
             if (e != null) {
-                return tx.finish(false, clock.now())
+                return tx.finish(false, clockService.now())
                         .handle((ignored, err) -> {
                             if (err != null) {
                                 e.addSuppressed(err);
@@ -848,7 +848,7 @@ public class InternalTableImpl implements InternalTable {
                         }); // Preserve failed state.
             }
 
-            return tx.finish(true, clock.now()).thenApply(ignored -> r);
+            return tx.finish(true, clockService.now()).thenApply(ignored -> r);
         }).thenCompose(identity());
     }
 
@@ -886,7 +886,7 @@ public class InternalTableImpl implements InternalTable {
                         .transactionId(txo.id())
                         .enlistmentConsistencyToken(enlistmentConsistencyToken)
                         .requestType(RW_GET)
-                        .timestamp(clock.now())
+                        .timestamp(clockService.now())
                         .full(false)
                         .coordinatorId(txo.coordinatorId())
                         .build(),
@@ -1020,7 +1020,7 @@ public class InternalTableImpl implements InternalTable {
                 .transactionId(tx.id())
                 .enlistmentConsistencyToken(enlistmentConsistencyToken)
                 .requestType(requestType)
-                .timestamp(clock.now())
+                .timestamp(clockService.now())
                 .full(full)
                 .coordinatorId(tx.coordinatorId())
                 .build();
@@ -1089,7 +1089,7 @@ public class InternalTableImpl implements InternalTable {
                         .transactionId(txo.id())
                         .enlistmentConsistencyToken(enlistmentConsistencyToken)
                         .requestType(RW_UPSERT)
-                        .timestamp(clock.now())
+                        .timestamp(clockService.now())
                         .full(tx == null)
                         .coordinatorId(txo.coordinatorId())
                         .build(),
@@ -1174,7 +1174,7 @@ public class InternalTableImpl implements InternalTable {
                         .transactionId(txo.id())
                         .enlistmentConsistencyToken(enlistmentConsistencyToken)
                         .requestType(RW_GET_AND_UPSERT)
-                        .timestamp(clock.now())
+                        .timestamp(clockService.now())
                         .full(tx == null)
                         .coordinatorId(txo.coordinatorId())
                         .build(),
@@ -1197,7 +1197,7 @@ public class InternalTableImpl implements InternalTable {
                         .transactionId(txo.id())
                         .enlistmentConsistencyToken(enlistmentConsistencyToken)
                         .requestType(RW_INSERT)
-                        .timestamp(clock.now())
+                        .timestamp(clockService.now())
                         .full(tx == null)
                         .coordinatorId(txo.coordinatorId())
                         .build(),
@@ -1255,7 +1255,7 @@ public class InternalTableImpl implements InternalTable {
                 .transactionId(tx.id())
                 .enlistmentConsistencyToken(enlistmentConsistencyToken)
                 .requestType(requestType)
-                .timestamp(clock.now())
+                .timestamp(clockService.now())
                 .full(full)
                 .coordinatorId(tx.coordinatorId())
                 .build();
@@ -1276,7 +1276,7 @@ public class InternalTableImpl implements InternalTable {
                         .transactionId(txo.id())
                         .enlistmentConsistencyToken(enlistmentConsistencyToken)
                         .requestType(RW_REPLACE_IF_EXIST)
-                        .timestamp(clock.now())
+                        .timestamp(clockService.now())
                         .full(tx == null)
                         .coordinatorId(txo.coordinatorId())
                         .build(),
@@ -1303,7 +1303,7 @@ public class InternalTableImpl implements InternalTable {
                         .transactionId(txo.id())
                         .enlistmentConsistencyToken(enlistmentConsistencyToken)
                         .requestType(RW_REPLACE)
-                        .timestamp(clock.now())
+                        .timestamp(clockService.now())
                         .full(tx == null)
                         .coordinatorId(txo.coordinatorId())
                         .build(),
@@ -1326,7 +1326,7 @@ public class InternalTableImpl implements InternalTable {
                         .transactionId(txo.id())
                         .enlistmentConsistencyToken(enlistmentConsistencyToken)
                         .requestType(RW_GET_AND_REPLACE)
-                        .timestamp(clock.now())
+                        .timestamp(clockService.now())
                         .full(tx == null)
                         .coordinatorId(txo.coordinatorId())
                         .build(),
@@ -1349,7 +1349,7 @@ public class InternalTableImpl implements InternalTable {
                         .transactionId(txo.id())
                         .enlistmentConsistencyToken(enlistmentConsistencyToken)
                         .requestType(RW_DELETE)
-                        .timestamp(clock.now())
+                        .timestamp(clockService.now())
                         .full(tx == null)
                         .coordinatorId(txo.coordinatorId())
                         .build(),
@@ -1372,7 +1372,7 @@ public class InternalTableImpl implements InternalTable {
                         .transactionId(txo.id())
                         .enlistmentConsistencyToken(enlistmentConsistencyToken)
                         .requestType(RW_DELETE_EXACT)
-                        .timestamp(clock.now())
+                        .timestamp(clockService.now())
                         .full(tx == null)
                         .coordinatorId(txo.coordinatorId())
                         .build(),
@@ -1395,7 +1395,7 @@ public class InternalTableImpl implements InternalTable {
                         .transactionId(txo.id())
                         .enlistmentConsistencyToken(enlistmentConsistencyToken)
                         .requestType(RW_GET_AND_DELETE)
-                        .timestamp(clock.now())
+                        .timestamp(clockService.now())
                         .full(tx == null)
                         .coordinatorId(txo.coordinatorId())
                         .build(),
@@ -1708,7 +1708,7 @@ public class InternalTableImpl implements InternalTable {
                     ReadWriteScanRetrieveBatchReplicaRequest request = 
TABLE_MESSAGES_FACTORY.readWriteScanRetrieveBatchReplicaRequest()
                             
.groupId(serializeTablePartitionId(tablePartitionId))
                             .tableId(tableId)
-                            .timestamp(clock.now())
+                            .timestamp(clockService.now())
                             .transactionId(txId)
                             .scanId(scanId)
                             .indexToUse(indexId)
@@ -1931,7 +1931,7 @@ public class InternalTableImpl implements InternalTable {
      * @return The enlist future (then will a leader become known).
      */
     protected CompletableFuture<IgniteBiTuple<ClusterNode, Long>> enlist(int 
partId, InternalTransaction tx) {
-        HybridTimestamp now = clock.now();
+        HybridTimestamp now = clockService.now();
 
         TablePartitionId tablePartitionId = new TablePartitionId(tableId, 
partId);
         tx.assignCommitPartition(tablePartitionId);
@@ -1962,7 +1962,7 @@ public class InternalTableImpl implements InternalTable {
 
     @Override
     public CompletableFuture<ClusterNode> partitionLocation(TablePartitionId 
tablePartitionId) {
-        return partitionMeta(tablePartitionId, 
clock.now()).thenApply(this::getClusterNode);
+        return partitionMeta(tablePartitionId, 
clockService.now()).thenApply(this::getClusterNode);
     }
 
     private CompletableFuture<ReplicaMeta> partitionMeta(TablePartitionId 
tablePartitionId, HybridTimestamp at) {
@@ -2052,7 +2052,7 @@ public class InternalTableImpl implements InternalTable {
     protected CompletableFuture<ClusterNode> evaluateReadOnlyRecipientNode(int 
partId) {
         TablePartitionId tablePartitionId = new TablePartitionId(tableId, 
partId);
 
-        return awaitPrimaryReplica(tablePartitionId, clock.now())
+        return awaitPrimaryReplica(tablePartitionId, clockService.now())
                 .handle((res, e) -> {
                     if (e != null) {
                         throw withCause(TransactionException::new, 
REPLICA_UNAVAILABLE_ERR, e);
@@ -2083,7 +2083,7 @@ public class InternalTableImpl implements InternalTable {
 
     @Override
     public CompletableFuture<Long> estimatedSize() {
-        HybridTimestamp now = clock.now();
+        HybridTimestamp now = clockService.now();
 
         var invokeFutures = new CompletableFuture<?>[partitions];
 
diff --git 
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerRecoveryTest.java
 
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerRecoveryTest.java
index 477d6644a2..f9fb352b9f 100644
--- 
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerRecoveryTest.java
+++ 
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerRecoveryTest.java
@@ -351,7 +351,6 @@ public class TableManagerRecoveryTest extends 
IgniteAbstractTest {
                 partitionOperationsExecutor,
                 partitionOperationsExecutor,
                 mock(ScheduledExecutorService.class),
-                clock,
                 clockService,
                 new 
OutgoingSnapshotsManager(clusterService.messagingService()),
                 distributionZoneManager,
diff --git 
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerTest.java
 
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerTest.java
index 7fa9f1f3db..d147cb185b 100644
--- 
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerTest.java
+++ 
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerTest.java
@@ -824,7 +824,6 @@ public class TableManagerTest extends IgniteAbstractTest {
                 partitionOperationsExecutor,
                 partitionOperationsExecutor,
                 mock(ScheduledExecutorService.class),
-                clock,
                 new TestClockService(clock),
                 new 
OutgoingSnapshotsManager(clusterService.messagingService()),
                 distributionZoneManager,
diff --git 
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/storage/InternalTableEstimatedSizeTest.java
 
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/storage/InternalTableEstimatedSizeTest.java
index aef4230ba4..86514ebc64 100644
--- 
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/storage/InternalTableEstimatedSizeTest.java
+++ 
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/storage/InternalTableEstimatedSizeTest.java
@@ -197,7 +197,7 @@ public class InternalTableEstimatedSizeTest extends 
BaseIgniteAbstractTest {
                 tableStorage,
                 txStateTableStorage,
                 new ReplicaService(clusterService.messagingService(), clock, 
replicationConfiguration),
-                clock,
+                clockService,
                 new HybridTimestampTracker(),
                 placementDriver,
                 new TransactionInflights(placementDriver, clockService),
diff --git 
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImplTest.java
 
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImplTest.java
index 1fef021d82..a269b9216c 100644
--- 
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImplTest.java
+++ 
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImplTest.java
@@ -35,7 +35,7 @@ import static org.mockito.Mockito.when;
 import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.ignite.internal.hlc.HybridClock;
+import org.apache.ignite.internal.hlc.ClockService;
 import org.apache.ignite.internal.hlc.HybridTimestamp;
 import org.apache.ignite.internal.network.SingleClusterNodeResolver;
 import org.apache.ignite.internal.placementdriver.PlacementDriver;
@@ -68,7 +68,7 @@ public class InternalTableImplTest extends 
BaseIgniteAbstractTest {
                 mock(MvTableStorage.class),
                 mock(TxStateTableStorage.class),
                 mock(ReplicaService.class),
-                mock(HybridClock.class),
+                mock(ClockService.class),
                 new HybridTimestampTracker(),
                 mock(PlacementDriver.class),
                 mock(TransactionInflights.class),
@@ -118,7 +118,7 @@ public class InternalTableImplTest extends 
BaseIgniteAbstractTest {
                 mock(MvTableStorage.class),
                 mock(TxStateTableStorage.class),
                 mock(ReplicaService.class),
-                mock(HybridClock.class),
+                mock(ClockService.class),
                 new HybridTimestampTracker(),
                 mock(PlacementDriver.class),
                 mock(TransactionInflights.class),
diff --git 
a/modules/table/src/testFixtures/java/org/apache/ignite/distributed/ItTxTestCluster.java
 
b/modules/table/src/testFixtures/java/org/apache/ignite/distributed/ItTxTestCluster.java
index 5cd302fcac..23428c0d60 100644
--- 
a/modules/table/src/testFixtures/java/org/apache/ignite/distributed/ItTxTestCluster.java
+++ 
b/modules/table/src/testFixtures/java/org/apache/ignite/distributed/ItTxTestCluster.java
@@ -632,7 +632,7 @@ public class ItTxTestCluster {
                 mock(MvTableStorage.class),
                 mock(TxStateTableStorage.class),
                 startClient ? clientReplicaSvc : 
replicaServices.get(localNodeName),
-                startClient ? clientClock : clocks.get(localNodeName),
+                startClient ? clientClockService : 
clockServices.get(localNodeName),
                 timestampTracker,
                 placementDriver,
                 clientTransactionInflights,
diff --git 
a/modules/table/src/testFixtures/java/org/apache/ignite/internal/table/impl/DummyInternalTableImpl.java
 
b/modules/table/src/testFixtures/java/org/apache/ignite/internal/table/impl/DummyInternalTableImpl.java
index 5ffaac334c..5eaa8c927c 100644
--- 
a/modules/table/src/testFixtures/java/org/apache/ignite/internal/table/impl/DummyInternalTableImpl.java
+++ 
b/modules/table/src/testFixtures/java/org/apache/ignite/internal/table/impl/DummyInternalTableImpl.java
@@ -255,7 +255,7 @@ public class DummyInternalTableImpl extends 
InternalTableImpl {
                 mock(MvTableStorage.class),
                 new TestTxStateTableStorage(),
                 replicaSvc,
-                CLOCK,
+                CLOCK_SERVICE,
                 tracker,
                 placementDriver,
                 transactionInflights,

Reply via email to