You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "zerolbsony (via GitHub)" <gi...@apache.org> on 2025/12/09 14:31:18 UTC
[PR] Remove the code check port is occupied and resolve the problem that can't rename file successfully [iotdb]
zerolbsony opened a new pull request, #16889:
URL: https://github.com/apache/iotdb/pull/16889
When starting datanode on windows os, the error will occur :
`Failed to replace formal system properties file, you may manually rename it: system.properties.tmp -> system.properties`
Because here use the FileUtils related functions from the ratis package, instead of similar function from node-commons.
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove the code check port is occupied and resolve the problem that can't rename file successfully [iotdb]
Posted by "CRZbulabula (via GitHub)" <gi...@apache.org>.
CRZbulabula merged PR #16889:
URL: https://github.com/apache/iotdb/pull/16889
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove the code check port is occupied and resolve the problem that can't rename file successfully [iotdb]
Posted by "CRZbulabula (via GitHub)" <gi...@apache.org>.
CRZbulabula commented on code in PR #16889:
URL: https://github.com/apache/iotdb/pull/16889#discussion_r2602933355
##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/file/SystemPropertiesHandler.java:
##########
@@ -185,8 +185,8 @@ private void replaceFormalFile() throws IOException {
throw new IOException(msg);
}
try {
- FileUtils.move(tmpFile.toPath(), formalFile.toPath());
- } catch (IOException e) {
+ FileUtils.moveFileSafe(tmpFile, formalFile);
+ } catch (Exception e) {
Review Comment:
Should catch the corresponding exception rather than `Exception`.
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org