-
Notifications
You must be signed in to change notification settings - Fork 966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IOTDB-6309] Lager interval for auto ratis leader balance #12116
Conversation
Quality Gate failedFailed conditions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL~ (weakly request changes)
if (IS_ENABLE_AUTO_LEADER_BALANCE_FOR_DATA_REGION | ||
&& (!ConsensusFactory.RATIS_CONSENSUS.equals(DATA_REGION_CONSENSUS_PROTOCOL_CLASS) | ||
|| System.currentTimeMillis() - lastFailedTimeForBalanceRatisDataLeader | ||
> BALANCE_RATIS_LEADER_FAILED_INTERVAL)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those if
check are somewhat annoying... Is it possible to optimize or simplify ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's impossible to simplify those if
, since the target of this PR is to distinguish the Ratis and IoT consensus protocol QAQ
if (TConsensusGroupType.DataRegion.equals(regionGroupType) | ||
&& ConsensusFactory.RATIS_CONSENSUS.equals(DATA_REGION_CONSENSUS_PROTOCOL_CLASS)) { | ||
lastFailedTimeForBalanceRatisDataLeader = System.currentTimeMillis(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too
https://issues.apache.org/jira/browse/IOTDB-6309