You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/09/27 09:18:47 UTC

[GitHub] [iotdb] jamber001 commented on a change in pull request #4042: [IOTDB-1749] sync-tool's lockInstance() dose not take effect

jamber001 commented on a change in pull request #4042:
URL: https://github.com/apache/iotdb/pull/4042#discussion_r716509270



##########
File path: server/src/main/java/org/apache/iotdb/db/sync/sender/transfer/SyncClient.java
##########
@@ -171,7 +171,8 @@ public void verifySingleton() throws IOException {
    * @param lockFile lock file
    */
   private boolean lockInstance(File lockFile) {
-    try (final RandomAccessFile randomAccessFile = new RandomAccessFile(lockFile, "rw")) {
+    try {
+      final RandomAccessFile randomAccessFile = new RandomAccessFile(lockFile, "rw");

Review comment:
       > randomAccessFile.close() will be not call?
   
   Please review next 15 line of codes below this change.
   randomAccessFile will be released when Process exit.
   




-- 
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