tkalkirill commented on a change in pull request #499:
URL: https://github.com/apache/ignite-3/pull/499#discussion_r773179435
##########
File path:
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/util/ConfigurationUtil.java
##########
@@ -963,4 +1067,70 @@ public static boolean containsNameAnnotation(Field
schemaField) {
return List.copyOf(keys.subList(0, keys.size() - 1));
}
}
+
+ /**
+ * Returns a configuration tree for the purpose of reading configuration
directly from the underlying storage. Actual reading is only
+ * happening while invoking {@link ConfigurationTree#value()}. It will
either throw {@link NoSuchElementException},
+ * {@link StorageException} or return the value.
+ * <p/>
+ * It is important to understand how it processes named list elements.
Imagine having element named {@code a} with internalId
+ * {@code aId}.
+ * <pre><code>
+ * var namedListProxy = directProxy(namedList);
+ *
+ * // Creates another proxy.
+ * var aElementProxy = namedListProxy.get("a");
+ *
+ * // This operation performs actual reading. It'll throw an exception
if element named "a" doesn't exist anymore.
+ * // It's been renamed or deleted.
+ * var aElement = aElementProxy.value();
+ *
+ * // Creates another proxy.
+ * var aIdElementProxy = getByInternalId(namedListProxy, aId);
+ *
+ * // This operation performs actual reading as previously stated.
But, unlake the access by name, it won't throw an exception in
Review comment:
fix it
--
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]