denis-chudov commented on code in PR #838:
URL: https://github.com/apache/ignite-3/pull/838#discussion_r887814623


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/schema/SqlSchemaManagerImpl.java:
##########
@@ -70,13 +70,21 @@ public SqlSchemaManagerImpl(
         schemasVv = new VersionedValue<>(registry, HashMap::new);
         tablesVv = new VersionedValue<>(registry, HashMap::new);
 
-        calciteSchemaVv = new VersionedValue<>(registry, () -> {
+        calciteSchemaVv = new VersionedValue<>(null, () -> {
             SchemaPlus newCalciteSchema = Frameworks.createRootSchema(false);
             newCalciteSchema.add("PUBLIC", new IgniteSchema("PUBLIC"));
             return newCalciteSchema;
         });
 
-        calciteSchemaVv.whenComplete((token, schema, e) -> 
listeners.forEach(SchemaUpdateListener::onSchemaUpdated));
+        schemasVv.whenComplete((token, stringIgniteSchemaMap, throwable) -> {
+            System.out.println("Receive token " + token);

Review Comment:
   left after debug?



##########
modules/core/src/main/java/org/apache/ignite/internal/causality/VersionedValue.java:
##########
@@ -285,6 +285,8 @@ public void complete(long causalityToken, T value) {
         checkToken(actualToken0, causalityToken);
 
         completeInternal(causalityToken, value, null);
+
+        completeOnRevision(causalityToken);

Review Comment:
   We have new limitation here: if VersionedValue is completed with a value, it 
should be completed manually on every revision update, revision registry cannot 
be set for this VV. Let's create a ticket to remove this limitation.



##########
modules/table/src/test/java/org/apache/ignite/internal/table/TableManagerTest.java:
##########
@@ -226,20 +230,7 @@ public void testPreconfiguredTable() throws Exception {
         when(rm.updateRaftGroup(any(), any(), any(), any())).thenAnswer(mock ->
                 
CompletableFuture.completedFuture(mock(RaftGroupService.class)));
 
-        TableManager tableManager = new TableManager(
-                revisionUpdater,
-                tblsCfg,
-                rm,
-                bm,
-                ts,
-                tm,
-                dsm = createDataStorageManager(configRegistry, workDir, 
rocksDbEngineConfig),
-                new SchemaManager(revisionUpdater, tblsCfg)

Review Comment:
   SchemaManager should be started.



-- 
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