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 2022/08/03 10:46:39 UTC

[GitHub] [iotdb] ljn55966005 commented on a diff in pull request #6855: [To rel/0.13] Improve the process of secondary

ljn55966005 commented on code in PR #6855:
URL: https://github.com/apache/iotdb/pull/6855#discussion_r936515917


##########
server/src/main/java/org/apache/iotdb/db/doublelive/OperationSyncProducer.java:
##########
@@ -33,22 +35,52 @@
 public class OperationSyncProducer {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(OperationSyncProducer.class);
-
-  private final BlockingQueue<Pair<ByteBuffer, OperationSyncPlanTypeUtils.OperationSyncPlanType>>
-      operationSyncQueue;
+  private static final Integer RETRY = 3;
+  private final ArrayList<
+          BlockingQueue<Pair<ByteBuffer, OperationSyncPlanTypeUtils.OperationSyncPlanType>>>
+      operationSyncQueues;
+  private final OperationSyncLogService dmlLogService;
 
   public OperationSyncProducer(
-      BlockingQueue<Pair<ByteBuffer, OperationSyncPlanTypeUtils.OperationSyncPlanType>>
-          operationSyncQueue) {
-    this.operationSyncQueue = operationSyncQueue;
+      ArrayList<BlockingQueue<Pair<ByteBuffer, OperationSyncPlanTypeUtils.OperationSyncPlanType>>>
+          operationSyncQueue,
+      OperationSyncLogService operationSyncDMLLogService) {
+    this.operationSyncQueues = operationSyncQueue;
+    this.dmlLogService = operationSyncDMLLogService;
   }
 
-  public void put(Pair<ByteBuffer, OperationSyncPlanTypeUtils.OperationSyncPlanType> planPair) {
+  public void put(
+      Pair<ByteBuffer, OperationSyncPlanTypeUtils.OperationSyncPlanType> planPair,
+      String deviceName) {
+
+    ByteBuffer headBuffer;
+    headBuffer = planPair.left;
+    headBuffer.position(0);
+    int index;
+    if (deviceName == null) {
+      index = operationSyncQueues.size() - 1;

Review Comment:
   we must prove the order of the same device



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