AMashenkov commented on code in PR #1754:
URL: https://github.com/apache/ignite-3/pull/1754#discussion_r1133587737
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/schema/SqlSchemaManagerImpl.java:
##########
@@ -150,58 +151,67 @@ public SchemaPlus schema(@Nullable String schema) {
/** {@inheritDoc} */
@Override
- @NotNull
- public IgniteTable tableById(UUID id, int ver) {
+ public CompletableFuture<?> actualSchemaAsync(long ver) {
if (!busyLock.enterBusy()) {
throw new IgniteInternalException(NODE_STOPPING_ERR, new
NodeStoppingException());
}
try {
- IgniteTable table = tablesVv.latest().get(id);
-
- // there is a chance that someone tries to resolve table before
- // the distributed event of that table creation has been processed
- // by TableManager, so we need to get in sync with the TableManager
- if (table == null || ver > table.version()) {
- table = awaitLatestTableSchema(id);
+ if (ver == -1) {
Review Comment:
Let's extract a constant NOT_INITIALIZED = -1
--
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]