yiguolei commented on code in PR #52879:
URL: https://github.com/apache/doris/pull/52879#discussion_r2209523907


##########
be/src/pipeline/exec/olap_scan_operator.cpp:
##########
@@ -450,30 +455,34 @@ Status 
OlapScanLocalState::_init_scanners(std::list<vectorized::ScannerSPtr>* sc
     return Status::OK();
 }
 
-Status OlapScanLocalState::hold_tablets() {
-    if (!_tablets.empty()) {
-        return Status::OK();
-    }
-
-    MonotonicStopWatch timer;
-    timer.start();
-    _tablets.resize(_scan_ranges.size());
-    _read_sources.resize(_scan_ranges.size());
-
-    if (config::is_cloud_mode()) {
-        std::vector<SyncRowsetStats> sync_statistics(_scan_ranges.size());
-        std::vector<std::function<Status()>> tasks {};
-        tasks.reserve(_scan_ranges.size());
-        int64_t duration_ns {0};
-        {
-            SCOPED_RAW_TIMER(&duration_ns);
+Status OlapScanLocalState::_sync_cloud_tablets(RuntimeState* state) {
+    if (config::is_cloud_mode() && !_sync_tablet) {
+        _pending_tablets_num = _scan_ranges.size();
+        if (_pending_tablets_num > 0) {
+            _cloud_tablet_dependency = Dependency::create_shared(
+                    _parent->operator_id(), _parent->node_id(), 
"CLOUD_TABLET_DEP");
+            _tablets.resize(_scan_ranges.size());
+            _tasks.reserve(_scan_ranges.size());
+            _sync_statistics.resize(_scan_ranges.size());
+            SCOPED_RAW_TIMER(&_duration_ns);

Review Comment:
   这个_duration_ns 似乎没用,因为底下这个调用是异步的。
   可能我们需要跟踪一下那个dependency的时间,比如他set ready的时候,记录一个时间,这样才是准确的。



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to