Skip to content

[Docs] Fix two stale notes in iotdb-system.properties.template - #19320

Open
farisbasha wants to merge 1 commit into
apache:masterfrom
farisbasha:docs-config-template-ratis-balance
Open

farisbasha wants to merge 1 commit into
apache:masterfrom
farisbasha:docs-config-template-ratis-balance

Conversation

@farisbasha

Copy link
Copy Markdown

Description

Two comments in iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template contradict the code and the value written right below them.

enable_auto_leader_balance_for_ratis_consensus

The comment says Notice: Default is false because the Ratis is unstable for this function., but the template sets enable_auto_leader_balance_for_ratis_consensus=true, and the code default is also true:

  • ConfigNodeConfig.java: private boolean enableAutoLeaderBalanceForRatisConsensus = true;
  • ConfigNodeDescriptor.java reads the key with String.valueOf(conf.isEnableAutoLeaderBalanceForRatisConsensus()) as the fallback.

A user reading the template is told the feature is off by default when it is on. The stale notice line is removed; the rest of the comment is unchanged.

max_expired_time

The comment says Datatype: int, but the value is 2592000000 (30 days in ms), which is larger than Integer.MAX_VALUE (2147483647). The code stores it as long maxExpiredTime = 2_592_000_000L (IoTDBConfig.java) and parses it with Long.parseLong (IoTDBDescriptor.java). The datatype is changed to long.

Comment-only change in the configuration template; no code or default value changes.


Key changed/added classes (or packages if there are too many classes) in this PR
  • iotdb-system.properties.template (comments only)

This was found with the help of an AI assistant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant