AMashenkov commented on a change in pull request #184:
URL: https://github.com/apache/ignite-3/pull/184#discussion_r658226078
##########
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:
Without this check the method call may end up with an exception.
However, in LiveSchema mode we have to detect somehow if the schema is
non-initialized, to register the first version on the first operation.
--
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]