Zakelly commented on code in PR #25363:
URL: https://github.com/apache/flink/pull/25363#discussion_r1772552389


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStGeneralMultiGetOperation.java:
##########
@@ -40,32 +44,163 @@ public class ForStGeneralMultiGetOperation implements 
ForStDBOperation {
 
     private final Runnable subProcessFinished;
 
+    private final Boolean isRemoteDb;
+
+    private final int readIoParallelism;
+
     ForStGeneralMultiGetOperation(
             RocksDB db, List<ForStDBGetRequest<?, ?, ?, ?>> batchRequest, 
Executor executor) {
-        this(db, batchRequest, executor, null);
+        this(db, batchRequest, executor, null, false, 1);
     }
 
     ForStGeneralMultiGetOperation(
             RocksDB db,
             List<ForStDBGetRequest<?, ?, ?, ?>> batchRequest,
             Executor executor,
-            Runnable subProcessFinished) {
+            Runnable subProcessFinished,

Review Comment:
   How about making `subProcessFinished` as the last parameter? More align with 
other requests' constructor style.



##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStGeneralMultiGetOperation.java:
##########
@@ -40,32 +44,163 @@ public class ForStGeneralMultiGetOperation implements 
ForStDBOperation {
 
     private final Runnable subProcessFinished;
 
+    private final Boolean isRemoteDb;
+
+    private final int readIoParallelism;
+
     ForStGeneralMultiGetOperation(
             RocksDB db, List<ForStDBGetRequest<?, ?, ?, ?>> batchRequest, 
Executor executor) {
-        this(db, batchRequest, executor, null);
+        this(db, batchRequest, executor, null, false, 1);
     }
 
     ForStGeneralMultiGetOperation(
             RocksDB db,
             List<ForStDBGetRequest<?, ?, ?, ?>> batchRequest,
             Executor executor,
-            Runnable subProcessFinished) {
+            Runnable subProcessFinished,
+            boolean isRemoteDb,
+            int readIoParallelism) {
         this.db = db;
         this.batchRequest = batchRequest;
         this.executor = executor;
         this.subProcessFinished = subProcessFinished;
+        this.isRemoteDb = isRemoteDb;
+        this.readIoParallelism = readIoParallelism;
     }
 
     @Override
     public CompletableFuture<Void> process() {
-        // TODO: Use MultiGet to optimize this implement
 
         CompletableFuture<Void> future = new CompletableFuture<>();
-
         AtomicReference<Exception> error = new AtomicReference<>();
         AtomicInteger counter = new AtomicInteger(batchRequest.size());
+
+        if (isRemoteDb) {
+            processOneByOne(batchRequest, error, counter, future);

Review Comment:
   ```suggestion
               return processOneByOne(batchRequest, error, counter);
   ```
   More readable?



-- 
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: issues-unsubscr...@flink.apache.org

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

Reply via email to