Berkof commented on a change in pull request #184:
URL: https://github.com/apache/ignite-3/pull/184#discussion_r657992595



##########
File path: 
modules/schema/src/main/java/org/apache/ignite/internal/schema/registry/SchemaRegistryImpl.java
##########
@@ -87,28 +83,37 @@ public SchemaRegistryImpl(int initialVer, Function<Integer, 
SchemaDescriptor> hi
             throw new SchemaRegistryException("Failed to find schema: ver=" + 
ver);
     }
 
-    /**
-     * Gets schema descriptor for the latest version if initialized.
-     *
-     * @return Schema descriptor if initialized, {@code null} otherwise.
-     * @throws SchemaRegistryException If failed.
-     */
+    /** {@inheritDoc} */
     @Override public @Nullable SchemaDescriptor schema() {
         final int lastVer0 = lastVer;
 
         if (lastVer0 == INITIAL_SCHEMA_VERSION)

Review comment:
       Why do we need this check? If there are some race here - we can return 
any SchemaDesctiptor (null or first).




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

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


Reply via email to