SteveYurongSu commented on code in PR #12606:
URL: https://github.com/apache/iotdb/pull/12606#discussion_r1620083352


##########
iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/consumer/SubscriptionConsumer.java:
##########
@@ -88,42 +85,12 @@ public abstract class SubscriptionConsumer implements 
AutoCloseable {
   private final long heartbeatIntervalMs;
   private final long endpointsSyncIntervalMs;
 
-  private final SubscriptionProviders subscriptionProviders;
-
-  private ScheduledExecutorService heartbeatWorkerExecutor;
-  private ScheduledExecutorService endpointsSyncerExecutor;
-
-  private ExecutorService asyncCommitExecutor;
+  private final SubscriptionProviders providers;
 
   private final AtomicBoolean isClosed = new AtomicBoolean(true);
 
   private final String fileSaveDir;
-
-  private Path getFileDir(final String topicName) throws IOException {
-    final Path dirPath =
-        
Paths.get(fileSaveDir).resolve(consumerGroupId).resolve(consumerId).resolve(topicName);
-    Files.createDirectories(dirPath);
-    return dirPath;
-  }
-
-  private Path getFilePath(final String topicName, String fileName) throws 
SubscriptionException {
-    Path filePath;
-    try {
-      filePath = getFileDir(topicName).resolve(fileName);
-      Files.createFile(filePath);
-    } catch (final FileAlreadyExistsException fileAlreadyExistsException) {
-      fileName += "." + RandomStringGenerator.generate(16);
-      try {
-        filePath = getFileDir(topicName).resolve(fileName);
-        Files.createFile(filePath);
-      } catch (final IOException e) {
-        throw new SubscriptionRuntimeNonCriticalException(e.getMessage(), e);
-      }
-    } catch (final IOException e) {
-      throw new SubscriptionRuntimeNonCriticalException(e.getMessage(), e);
-    }
-    return filePath;
-  }
+  private final boolean fileSync;

Review Comment:
   ```suggestion
     private final boolean fileSaveFsync;
   ```



-- 
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-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to