sokui commented on a change in pull request #3186:
URL: https://github.com/apache/ozone/pull/3186#discussion_r840875376
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/datanode/InitDatanodeState.java
##########
@@ -125,7 +125,7 @@ private void persistContainerDatanodeDetails() {
File idPath = new File(dataNodeIDPath);
DatanodeDetails datanodeDetails = this.context.getParent()
.getDatanodeDetails();
- if (datanodeDetails != null && !idPath.exists()) {
Review comment:
This is because when the datanode got restarted in k8s, the IP will be
changed. So the original info in this file is not accurate any more. This will
make sure we update with the latest info.
And when we are not using k8s, I think it is not harmful to always update
this file whenever the node restarts.
--
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]