dataroaring commented on code in PR #22829:
URL: https://github.com/apache/doris/pull/22829#discussion_r1297209672


##########
be/src/runtime/group_commit_mgr.h:
##########
@@ -0,0 +1,138 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+
+#include <gen_cpp/PaloInternalService_types.h>
+
+#include "common/status.h"
+#include "io/fs/stream_load_pipe.h"
+#include "util/lock.h"
+#include "util/threadpool.h"
+#include "util/thrift_util.h"
+#include "vec/core/block.h"
+
+namespace doris {
+class ExecEnv;
+class TPlan;
+class TDescriptorTable;
+class TUniqueId;
+class TExecPlanFragmentParams;
+class ObjectPool;
+class RuntimeState;
+class StreamLoadPipe;
+
+class LoadBlockQueue {
+public:
+    LoadBlockQueue(const UniqueId& load_instance_id, std::string& label, 
int64_t txn_id,
+                   int64_t schema_version)
+            : load_instance_id(load_instance_id),
+              label(label),
+              txn_id(txn_id),
+              schema_version(schema_version),
+              _start_time(std::chrono::steady_clock::now()) {
+        _mutex = std::make_shared<doris::Mutex>();
+        _cv = std::make_shared<doris::ConditionVariable>();
+    };
+
+    Status add_block(std::shared_ptr<vectorized::FutureBlock> block);
+    Status get_block(vectorized::Block* block, bool* find_block, bool* eos);
+    void remove_block_id(const UniqueId& unique_id);
+    void cancel(const Status& st);
+
+    UniqueId load_instance_id;
+    std::string label;
+    int64_t txn_id;
+    int64_t schema_version;
+    bool need_commit = false;
+
+private:
+    std::chrono::steady_clock::time_point _start_time;
+
+    std::shared_ptr<doris::Mutex> _mutex;
+    std::shared_ptr<doris::ConditionVariable> _cv;
+    std::set<UniqueId> _block_unique_ids;

Review Comment:
   rename it to _load_unique_ids.



-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to