AMashenkov commented on code in PR #2441:
URL: https://github.com/apache/ignite-3/pull/2441#discussion_r1294384702


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutableTableRegistryImpl.java:
##########
@@ -62,13 +62,19 @@ public ExecutableTableRegistryImpl(TableManager 
tableManager, SchemaManager sche
         this.clock = clock;
         this.tableCache = Caffeine.newBuilder()
                 .maximumSize(cacheSize)
-                .<Integer, ExecutableTable>buildAsync().asMap();
+                .<Long, ExecutableTable>buildAsync().asMap();
     }
 
     /** {@inheritDoc} */
     @Override
-    public CompletableFuture<ExecutableTable> getTable(int tableId, 
TableDescriptor tableDescriptor) {
-        return tableCache.computeIfAbsent(tableId, (k) -> loadTable(k, 
tableDescriptor));
+    public CompletableFuture<ExecutableTable> getTable(int schemaVersion, int 
tableId, TableDescriptor tableDescriptor) {

Review Comment:
   As I understand, we introduce this cache to leverage impact of awaiting 
table availability, because of we have no schema synchronization yet.
   I think, with schema synchronization local state will be always actual here. 
Thus, we could ask TableManager for a table by ID synchronously without any 
waiting, and cache will gone.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to