dosubot[bot] commented on issue #2629: URL: https://github.com/apache/incubator-hugegraph/issues/2629#issuecomment-2279156725
<!-- Answer --> The `maxEntriesSize` configuration parameter in JRaft is not taking effect despite being set to 2048 in your `application.yml` file because it is being overridden by the value set in the `PartitionEngine` class. Specifically, the `maxEntriesSize` is set using the value from `options.getRaftOptions().getMaxEntriesSize()`. Here is the relevant code snippet from the `PartitionEngine` class: ```java // Setting raft configuration RaftOptions raftOptions = nodeOptions.getRaftOptions(); raftOptions.setMaxEntriesSize(options.getRaftOptions().getMaxEntriesSize()); ``` To ensure that the `maxEntriesSize` value from your `application.yml` file is used, you need to verify that `options.getRaftOptions().getMaxEntriesSize()` returns the correct value (2048 in this case). If it does not, you may need to check how the `options` object is being initialized and ensure it correctly reads the configuration from your `application.yml` file <sup>[[1]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-store/hg-store-core/src/main/java/org/apache/hugegraph/store/PartitionEngine.java)</sup>. The `options` object is initialized and populated with values from the `application.yml` file through the `CoreOptions` class. This class uses the `ConfigOption` class to define various configuration options, which are then registered and accessed through the `instance()` method. The singleton pattern ensures that these options are initialized only once and are accessible throughout the application <sup>[[2]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/config/CoreOptions.java)</sup><sup>[[3]](https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-spark-connector/src/main/java/org/apache/hugegraph/spark/connector/options/HGOptions.java)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
