ibessonov commented on code in PR #2817:
URL: https://github.com/apache/ignite-3/pull/2817#discussion_r1390804125
##########
modules/configuration/README.md:
##########
@@ -341,40 +341,81 @@ public interface ChildView {
}
public interface PolymorphicView {
- String typeId();
+ String typeId();
Review Comment:
Why did you change all paddings in the file?
##########
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/ConfigurationChanger.java:
##########
@@ -295,6 +314,17 @@ private void persistDefaults() {
});
}
+ /**
+ * Sets {@link #initialConfiguration}. This configuration will be used to
initialize the configuration if the storage is empty. If the
+ * storage is not empty, this configuration will be ignored. This method
should be called before {@link #start()}. If the method is
+ * called after the start, the provided configuration will be ignored.
+ *
+ * @param configurationSource the configuration source to initialize with.
+ */
+ public void initializeConfigurationWith(ConfigurationSource
configurationSource) {
+ initialConfiguration = configurationSource;
Review Comment:
Please assert that the instance is not yet started. Just in case
##########
modules/configuration/README.md:
##########
@@ -341,40 +341,81 @@ public interface ChildView {
}
public interface PolymorphicView {
- String typeId();
+ String typeId();
}
public interface FirstPolymorphicInstanceView extends PolymorphicView {
- int intVal();
+ int intVal();
}
```
-`ParentView#polymorphicChild()` will return a view of a specific type of
polymorphic configuration, for example `FirstPolymorphicInstanceView`.
+`ParentView#polymorphicChild()` will return a view of a specific type of
polymorphic configuration, for
+example `FirstPolymorphicInstanceView`.
+
+### Dynamic configuration defaults
+
+Configuration defaults are defined in the configuration schema. However, it is
not possible define them there in the following cases:
Review Comment:
```suggestion
Configuration defaults are defined in the configuration schema. However, it
is not possible to define them there in the following cases:
```
--
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]