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

rpuch 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 77933c97675 IGNITE-27958 Remove dead code from TableManager (#7652)
77933c97675 is described below

commit 77933c9767544573e5d99ae44d227a9d242d5c8d
Author: Viacheslav Blinov <[email protected]>
AuthorDate: Wed Feb 25 13:25:32 2026 +0300

    IGNITE-27958 Remove dead code from TableManager (#7652)
---
 .../rebalance/ItRebalanceDistributedTest.java      |  5 --
 .../partition/replicator/fixtures/Node.java        |  5 --
 .../runner/app/ItIgniteNodeRestartTest.java        |  5 --
 .../org/apache/ignite/internal/app/IgniteImpl.java |  5 --
 .../internal/table/distributed/TableManager.java   | 72 ----------------------
 .../distributed/TableManagerRecoveryTest.java      |  5 --
 .../table/distributed/TableManagerTest.java        |  5 --
 7 files changed, 102 deletions(-)

diff --git 
a/modules/distribution-zones/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java
 
b/modules/distribution-zones/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java
index 37a200bddd0..dc8ff4d8942 100644
--- 
a/modules/distribution-zones/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java
+++ 
b/modules/distribution-zones/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java
@@ -1575,19 +1575,15 @@ public class ItRebalanceDistributedTest extends 
BaseIgniteAbstractTest {
                     replicationConfiguration,
                     clusterService.messagingService(),
                     clusterService.topologyService(),
-                    clusterService.serializationRegistry(),
-                    replicaManager,
                     mock(LockManager.class),
                     replicaSvc,
                     txManager,
                     dataStorageMgr,
-                    sharedTxStateStorage,
                     metaStorageManager,
                     schemaManager,
                     new CatalogValidationSchemasSource(catalogManager, 
schemaManager),
                     threadPoolsManager.tableIoExecutor(),
                     threadPoolsManager.partitionOperationsExecutor(),
-                    threadPoolsManager.commonScheduler(),
                     clockService,
                     outgoingSnapshotManager,
                     schemaSyncService,
@@ -1600,7 +1596,6 @@ public class ItRebalanceDistributedTest extends 
BaseIgniteAbstractTest {
                     lowWatermark,
                     transactionInflights,
                     indexMetaStorage,
-                    partitionsLogSyncer,
                     partitionReplicaLifecycleManager,
                     minTimeCollectorService,
                     systemDistributedConfiguration,
diff --git 
a/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/fixtures/Node.java
 
b/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/fixtures/Node.java
index f0306d79b66..531abe729c6 100644
--- 
a/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/fixtures/Node.java
+++ 
b/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/fixtures/Node.java
@@ -780,19 +780,15 @@ public class Node {
                 replicationConfiguration,
                 clusterService.messagingService(),
                 clusterService.topologyService(),
-                clusterService.serializationRegistry(),
-                replicaManager,
                 lockManager,
                 replicaSvc,
                 txManager,
                 dataStorageMgr,
-                sharedTxStateStorage,
                 metaStorageManager,
                 schemaManager,
                 validationSchemasSource,
                 threadPoolsManager.tableIoExecutor(),
                 threadPoolsManager.partitionOperationsExecutor(),
-                threadPoolsManager.commonScheduler(),
                 clockService,
                 outgoingSnapshotsManager,
                 schemaSyncService,
@@ -805,7 +801,6 @@ public class Node {
                 lowWatermark,
                 transactionInflights,
                 indexMetaStorage,
-                partitionsLogSyncer,
                 partitionReplicaLifecycleManager,
                 minTimeCollectorService,
                 systemDistributedConfiguration,
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 beb61a0502a..ef95731a889 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
@@ -796,19 +796,15 @@ public class ItIgniteNodeRestartTest extends 
BaseIgniteRestartTest {
                 replicationConfiguration,
                 messagingServiceReturningToStorageOperationsPool,
                 clusterSvc.topologyService(),
-                clusterSvc.serializationRegistry(),
-                replicaMgr,
                 lockManager,
                 replicaService,
                 txManager,
                 dataStorageManager,
-                sharedTxStateStorage,
                 metaStorageMgr,
                 schemaManager,
                 validationSchemasSource,
                 threadPoolsManager.tableIoExecutor(),
                 threadPoolsManager.partitionOperationsExecutor(),
-                threadPoolsManager.commonScheduler(),
                 clockService,
                 outgoingSnapshotManager,
                 schemaSyncService,
@@ -821,7 +817,6 @@ public class ItIgniteNodeRestartTest extends 
BaseIgniteRestartTest {
                 lowWatermark,
                 transactionInflights,
                 indexMetaStorage,
-                partitionsLogSyncer,
                 partitionReplicaLifecycleListener,
                 minTimeCollectorService,
                 systemDistributedConfiguration,
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 c91a98f304c..6498fb49dfe 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
@@ -1158,19 +1158,15 @@ public class IgniteImpl implements Ignite {
                 replicationConfig,
                 messagingServiceReturningToStorageOperationsPool,
                 clusterSvc.topologyService(),
-                clusterSvc.serializationRegistry(),
-                replicaMgr,
                 lockMgr,
                 replicaSvc,
                 txManager,
                 dataStorageMgr,
-                sharedTxStateStorage,
                 metaStorageMgr,
                 schemaManager,
                 validationSchemasSource,
                 threadPoolsManager.tableIoExecutor(),
                 threadPoolsManager.partitionOperationsExecutor(),
-                threadPoolsManager.commonScheduler(),
                 clockService,
                 outgoingSnapshotsManager,
                 schemaSyncService,
@@ -1183,7 +1179,6 @@ public class IgniteImpl implements Ignite {
                 lowWatermark,
                 transactionInflights,
                 indexMetaStorage,
-                partitionsLogSyncer,
                 partitionReplicaLifecycleManager,
                 minTimeCollectorService,
                 systemDistributedConfiguration,
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 afb9b727471..88afb63593a 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
@@ -26,7 +26,6 @@ import static 
java.util.concurrent.CompletableFuture.failedFuture;
 import static java.util.concurrent.CompletableFuture.runAsync;
 import static java.util.concurrent.CompletableFuture.supplyAsync;
 import static java.util.function.Function.identity;
-import static java.util.stream.Collectors.groupingBy;
 import static java.util.stream.Collectors.toList;
 import static 
org.apache.ignite.internal.causality.IncrementalVersionedValue.dependingOn;
 import static org.apache.ignite.internal.event.EventListener.fromConsumer;
@@ -90,7 +89,6 @@ import 
org.apache.ignite.internal.causality.CompletionListener;
 import org.apache.ignite.internal.causality.IncrementalVersionedValue;
 import org.apache.ignite.internal.causality.OutdatedTokenException;
 import org.apache.ignite.internal.causality.RevisionListenerRegistry;
-import org.apache.ignite.internal.components.LogSyncer;
 import org.apache.ignite.internal.configuration.SystemDistributedConfiguration;
 import 
org.apache.ignite.internal.configuration.utils.SystemDistributedConfigurationPropertyHolder;
 import org.apache.ignite.internal.distributionzones.DistributionZonesUtil;
@@ -116,7 +114,6 @@ import org.apache.ignite.internal.metrics.MetricManager;
 import org.apache.ignite.internal.network.InternalClusterNode;
 import org.apache.ignite.internal.network.MessagingService;
 import org.apache.ignite.internal.network.TopologyService;
-import 
org.apache.ignite.internal.network.serialization.MessageSerializationRegistry;
 import 
org.apache.ignite.internal.partition.replicator.LocalBeforeReplicaStartEventParameters;
 import 
org.apache.ignite.internal.partition.replicator.LocalPartitionReplicaEventParameters;
 import org.apache.ignite.internal.partition.replicator.NaiveAsyncReadWriteLock;
@@ -132,7 +129,6 @@ import 
org.apache.ignite.internal.placementdriver.PlacementDriver;
 import 
org.apache.ignite.internal.placementdriver.wrappers.ExecutorInclinedPlacementDriver;
 import org.apache.ignite.internal.raft.ExecutorInclinedRaftCommandRunner;
 import org.apache.ignite.internal.raft.service.RaftCommandRunner;
-import org.apache.ignite.internal.replicator.ReplicaManager;
 import org.apache.ignite.internal.replicator.ReplicaService;
 import org.apache.ignite.internal.replicator.TablePartitionId;
 import org.apache.ignite.internal.replicator.ZonePartitionId;
@@ -179,7 +175,6 @@ import 
org.apache.ignite.internal.tx.impl.RemotelyTriggeredResourceRegistry;
 import org.apache.ignite.internal.tx.impl.TransactionInflights;
 import org.apache.ignite.internal.tx.impl.TransactionStateResolver;
 import org.apache.ignite.internal.tx.metrics.TransactionMetricsSource;
-import 
org.apache.ignite.internal.tx.storage.state.rocksdb.TxStateRocksDbSharedStorage;
 import org.apache.ignite.internal.util.CompletableFutures;
 import org.apache.ignite.internal.util.IgniteSpinBusyLock;
 import org.apache.ignite.internal.util.IgniteUtils;
@@ -203,9 +198,6 @@ public class TableManager implements IgniteTablesInternal, 
IgniteComponent {
 
     private final TopologyService topologyService;
 
-    /** Replica manager. */
-    private final ReplicaManager replicaMgr;
-
     /** Lock manager. */
     private final LockManager lockMgr;
 
@@ -267,8 +259,6 @@ public class TableManager implements IgniteTablesInternal, 
IgniteComponent {
     /** Schema manager. */
     private final SchemaManager schemaManager;
 
-    private final TxStateRocksDbSharedStorage sharedTxStateStorage;
-
     /** Scan request executor. */
     private final ExecutorService scanRequestExecutor;
 
@@ -379,7 +369,6 @@ public class TableManager implements IgniteTablesInternal, 
IgniteComponent {
      * @param gcConfig Garbage collector configuration.
      * @param txCfg Transaction configuration.
      * @param replicationConfiguration Replication configuration.
-     * @param replicaMgr Replica manager.
      * @param lockMgr Lock manager.
      * @param replicaSvc Replica service.
      * @param txManager Transaction manager.
@@ -389,8 +378,6 @@ public class TableManager implements IgniteTablesInternal, 
IgniteComponent {
      *         persisting.
      * @param partitionOperationsExecutor Striped executor on which partition 
operations (potentially requiring I/O with storages)
      *         will be executed.
-     * @param commonScheduler Common Scheduled executor. Needed only for 
asynchronous start of scheduled operations without
-     *         performing blocking, long or IO operations.
      * @param clockService hybrid logical clock service.
      * @param placementDriver Placement driver.
      * @param sql A supplier function that returns {@link IgniteSql}.
@@ -410,19 +397,15 @@ public class TableManager implements 
IgniteTablesInternal, IgniteComponent {
             ReplicationConfiguration replicationConfiguration,
             MessagingService messagingService,
             TopologyService topologyService,
-            MessageSerializationRegistry messageSerializationRegistry,
-            ReplicaManager replicaMgr,
             LockManager lockMgr,
             ReplicaService replicaSvc,
             TxManager txManager,
             DataStorageManager dataStorageMgr,
-            TxStateRocksDbSharedStorage txStateRocksDbSharedStorage,
             MetaStorageManager metaStorageMgr,
             SchemaManager schemaManager,
             ValidationSchemasSource validationSchemasSource,
             ExecutorService ioExecutor,
             Executor partitionOperationsExecutor,
-            ScheduledExecutorService commonScheduler,
             ClockService clockService,
             OutgoingSnapshotsManager outgoingSnapshotsManager,
             SchemaSyncService schemaSyncService,
@@ -435,7 +418,6 @@ public class TableManager implements IgniteTablesInternal, 
IgniteComponent {
             LowWatermark lowWatermark,
             TransactionInflights transactionInflights,
             IndexMetaStorage indexMetaStorage,
-            LogSyncer logSyncer,
             PartitionReplicaLifecycleManager partitionReplicaLifecycleManager,
             MinimumRequiredTimeCollectorService minTimeCollectorService,
             SystemDistributedConfiguration systemDistributedConfiguration,
@@ -443,7 +425,6 @@ public class TableManager implements IgniteTablesInternal, 
IgniteComponent {
             PartitionModificationCounterFactory 
partitionModificationCounterFactory
     ) {
         this.topologyService = topologyService;
-        this.replicaMgr = replicaMgr;
         this.lockMgr = lockMgr;
         this.replicaSvc = replicaSvc;
         this.txManager = txManager;
@@ -505,8 +486,6 @@ public class TableManager implements IgniteTablesInternal, 
IgniteComponent {
                 tableId -> tablesById().get(tableId)
         );
 
-        this.sharedTxStateStorage = txStateRocksDbSharedStorage;
-
         fullStateTransferIndexChooser = new 
FullStateTransferIndexChooser(catalogService, lowWatermark, indexMetaStorage);
 
         rebalanceRetryDelayConfiguration = new 
SystemDistributedConfigurationPropertyHolder<>(
@@ -1882,57 +1861,6 @@ public class TableManager implements 
IgniteTablesInternal, IgniteComponent {
         }
     }
 
-    private void destroyTxStateStoragesForTablesNotIn(Set<Integer> 
aliveTableIds) {
-        Set<Integer> tableIdsOnDisk = sharedTxStateStorage.zoneIdsOnDisk();
-
-        for (int tableId : difference(tableIdsOnDisk, aliveTableIds)) {
-            sharedTxStateStorage.destroyStorage(tableId);
-            LOG.info("Destroyed table TX state storage for table {}", tableId);
-        }
-    }
-
-    private void destroyReplicationProtocolStoragesForTablesNotIn(Set<Integer> 
aliveTableIds) {
-        Set<TablePartitionId> partitionIdsOnDisk;
-        try {
-            partitionIdsOnDisk = 
replicaMgr.replicationProtocolTablePartitionIdsOnDisk();
-        } catch (NodeStoppingException e) {
-            // We'll proceed on next start.
-            return;
-        }
-
-        Map<Integer, List<TablePartitionId>> partitionIdsByTableId = 
partitionIdsOnDisk.stream()
-                .collect(groupingBy(TablePartitionId::tableId));
-
-        for (Map.Entry<Integer, List<TablePartitionId>> entry : 
partitionIdsByTableId.entrySet()) {
-            int tableId = entry.getKey();
-            List<TablePartitionId> partitionIds = entry.getValue();
-
-            if (!aliveTableIds.contains(tableId)) {
-                destroyReplicationProtocolStoragesOnRecovery(tableId, 
partitionIds);
-            }
-        }
-    }
-
-    private void destroyReplicationProtocolStoragesOnRecovery(int tableId, 
List<TablePartitionId> partitionIds) {
-        for (TablePartitionId partitionId : partitionIds) {
-            try {
-                
replicaMgr.destroyReplicationProtocolStoragesOnStartup(partitionId);
-            } catch (NodeStoppingException e) {
-                // No problem, we'll proceed on next start.
-                break;
-            }
-        }
-
-        List<Integer> partitionIndexes = partitionIds.stream()
-                .map(TablePartitionId::partitionId)
-                .collect(toList());
-        LOG.info(
-                "Destroyed replication protocol storages for table {} and 
partitions {}",
-                tableId,
-                partitionIndexes
-        );
-    }
-
     private synchronized ScheduledExecutorService streamerFlushExecutor() {
         if (!busyLock.enterBusy()) {
             throw new IgniteException(NODE_STOPPING_ERR, new 
NodeStoppingException());
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 64d5286ee2c..d93b06b04cf 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
@@ -567,19 +567,15 @@ public class TableManagerRecoveryTest extends 
IgniteAbstractTest {
                 replicationConfiguration,
                 clusterService.messagingService(),
                 clusterService.topologyService(),
-                clusterService.serializationRegistry(),
-                replicaMgr,
                 null,
                 null,
                 txManager,
                 dsm,
-                sharedTxStateStorage,
                 metaStorageManager,
                 sm,
                 mock(ValidationSchemasSource.class),
                 partitionOperationsExecutor,
                 partitionOperationsExecutor,
-                scheduledExecutor,
                 clockService,
                 outgoingSnapshotManager,
                 schemaSyncService,
@@ -592,7 +588,6 @@ public class TableManagerRecoveryTest extends 
IgniteAbstractTest {
                 lowWatermark,
                 new TransactionInflights(placementDriver, clockService, 
txStateVolatileStorage),
                 indexMetaStorage,
-                logSyncer,
                 partitionReplicaLifecycleManager,
                 minTimeCollectorService,
                 systemDistributedConfiguration,
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 03ebd18c989..aa67fbca1f8 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
@@ -577,19 +577,15 @@ public class TableManagerTest extends IgniteAbstractTest {
                 replicationConfiguration,
                 clusterService.messagingService(),
                 clusterService.topologyService(),
-                clusterService.serializationRegistry(),
-                replicaMgr,
                 mock(LockManager.class),
                 mock(ReplicaService.class),
                 tm,
                 dsm,
-                sharedTxStateStorage,
                 msm,
                 sm,
                 mock(ValidationSchemasSource.class),
                 partitionOperationsExecutor,
                 partitionOperationsExecutor,
-                scheduledExecutor,
                 new TestClockService(clock),
                 new OutgoingSnapshotsManager(node.name(), 
clusterService.messagingService(), failureProcessor),
                 new AlwaysSyncedSchemaSyncService(),
@@ -602,7 +598,6 @@ public class TableManagerTest extends IgniteAbstractTest {
                 lowWatermark,
                 mock(TransactionInflights.class),
                 indexMetaStorage,
-                logSyncer,
                 partitionReplicaLifecycleManager,
                 new MinimumRequiredTimeCollectorServiceImpl(),
                 systemDistributedConfiguration,

Reply via email to