tkalkirill commented on code in PR #2413:
URL: https://github.com/apache/ignite-3/pull/2413#discussion_r1285614279
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -443,9 +444,15 @@ private CompletableFuture<AsyncSqlCursor<List<Object>>>
querySingle0(
boolean implicitTxRequired = outerTx == null;
- tx.set(implicitTxRequired ? txManager.begin(!rwOp, null) :
outerTx);
+ InternalTransaction currentTx = implicitTxRequired ?
txManager.begin(!rwOp, null) : outerTx;
- SchemaPlus schema = sqlSchemaManager.schema(schemaName);
+ tx.set(currentTx);
+
+ // TODO IGNITE-18733: wait for actual metadata for TX.
+ HybridTimestamp txTimestamp = currentTx.startTimestamp();
+ int observableCatalogVersion =
catalogManager.activeCatalogVersion(txTimestamp.longValue());
+
+ SchemaPlus schema = sqlSchemaManager.schema(schemaName,
observableCatalogVersion);
Review Comment:
Whether correctly I understand that the version of the scheme and the
catalog are equal?
If yes, then it is necessary to correct the documentation of the method and
the naming of variables, for example, obtaining the schema by the name and
version of the directory.
If not, then you probably need to fix or create a ticket (indicate the
existing one) that this will be fixed in the future.
At the moment, I assume that the versions of the schemas and the catalog
will be different, since an entity not related to the schema, such as a zone,
table, and index, may change in the catalog.
--
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]