You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sa...@apache.org on 2023/12/18 16:06:03 UTC

(ignite-3) branch main updated: IGNITE-20916 Remove API future related code from TableManager (#2968)

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 56d6226756 IGNITE-20916 Remove API future related code from TableManager (#2968)
56d6226756 is described below

commit 56d622675685f999bde8d3e4358c748bb7e09669
Author: Denis Chudov <mo...@gmail.com>
AuthorDate: Mon Dec 18 19:05:58 2023 +0300

    IGNITE-20916 Remove API future related code from TableManager (#2968)
---
 .../internal/table/distributed/TableManager.java   | 22 ----------------------
 1 file changed, 22 deletions(-)

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 fe0a3647b8..cacdb8edb7 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
@@ -226,9 +226,6 @@ public class TableManager implements IgniteTablesInternal, IgniteComponent {
     /** Transaction state resolver. */
     private final TransactionStateResolver transactionStateResolver;
 
-    /** Here a table future stores during creation (until the table can be provided to client). */
-    private final Map<Integer, CompletableFuture<Table>> tableCreateFuts = new ConcurrentHashMap<>();
-
     /**
      * Versioned store for tables by id. Only table instances are created here, local storages and RAFT groups may not be initialized yet.
      *
@@ -1148,8 +1145,6 @@ public class TableManager implements IgniteTablesInternal, IgniteComponent {
             pendingTables.remove(tableId);
         }));
 
-        tablesById(causalityToken).thenRun(() -> inBusyLock(busyLock, () -> completeApiCreateFuture(table)));
-
         // TODO should be reworked in IGNITE-16763
 
         // TODO: https://issues.apache.org/jira/browse/IGNITE-19913 Possible performance degradation.
@@ -1210,23 +1205,6 @@ public class TableManager implements IgniteTablesInternal, IgniteComponent {
         return txStateTableStorage;
     }
 
-    /**
-     * Completes appropriate future to return result from API {@link TableManager#createTableLocally}.
-     *
-     * @param table Table.
-     */
-    private void completeApiCreateFuture(TableImpl table) {
-        LOG.trace("Finish creating table: name={}, id={}", table.name(), table.tableId());
-
-        CompletableFuture<Table> tblFut = tableCreateFuts.get(table.tableId());
-
-        if (tblFut != null) {
-            tblFut.complete(table);
-
-            tableCreateFuts.values().removeIf(fut -> fut == tblFut);
-        }
-    }
-
     /**
      * Drops local structures for a table.
      *