-
Notifications
You must be signed in to change notification settings - Fork 967
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
[To rel/1.0] Cherry pick cluster node start protocol for rel/1.0 #8592
Conversation
// Notice: The Seed-ConfigNode must also have the privilege to give system configuration. | ||
// Otherwise, the IoTDB-cluster will not have the ability to restart from scratch. | ||
if (status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode() | ||
|| ConfigNodeDescriptor.getInstance().isSeedConfigNode() |
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.
Remove || ConfigNodeDescriptor.getInstance().isSeedConfigNode() || SystemPropertiesUtils.isSeedConfigNode()
judgement?
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.
No. The Seed-ConfigNode must also have the privilege to give system configuration.
TSStatus status = confirmLeader(); | ||
// Notice: The Seed-ConfigNode must also have the privilege to do Node restart check. | ||
// Otherwise, the IoTDB-cluster will not have the ability to restart from scratch. | ||
if (status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode() |
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.
Remove || ConfigNodeDescriptor.getInstance().isSeedConfigNode() || SystemPropertiesUtils.isSeedConfigNode()
judgement?
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.
No. The Seed-ConfigNode must also have the privilege to do Node restart check.
// Notice: The Seed-ConfigNode must also have the privilege to do Node restart check. | ||
// Otherwise, the IoTDB-cluster will not have the ability to restart from scratch. | ||
if (status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode() | ||
|| ConfigNodeDescriptor.getInstance().isSeedConfigNode() |
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.
Remove || ConfigNodeDescriptor.getInstance().isSeedConfigNode()
?
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.
No. The Seed-ConfigNode must also have the privilege to do Node restart check.
if (clusterName == null) { | ||
LOGGER.warn( | ||
"Lack cluster_name field in data/confignode/system/confignode-system.properties, set it as defaultCluster"); | ||
systemProperties.setProperty("cluster_name", "defaultCluster"); |
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.
Change to constant CLUSTER_NAME and DEFAULT_CLUSTER_NAME
private static final int SCHEDULE_WAITING_RETRY_NUM = 20; | ||
private static final long STARTUP_RETRY_INTERVAL_IN_MS = TimeUnit.SECONDS.toMillis(30); |
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.
30000ms? before is 1000ms
// Check system configurations | ||
IoTDBStartCheck.getInstance().checkSystemConfig(); | ||
|
||
return isFirstStart; |
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.
return !SYSTEM_PROPERTIES.exists();
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.
No. The system.properties file will be created in IoTDBStartCheck.getInstance().checkSystemConfig(). So we should get the isFirstStart at the beginning
SonarCloud Quality Gate failed. |
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
I have tested the compatibility from 1.0 to 1.0.1
1.0 lib:
1.0.1 lib: