Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bobhan1 committed Jan 13, 2025
1 parent ca6b229 commit 720a0f3
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions be/src/pipeline/exec/olap_scan_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,17 @@ Status OlapScanLocalState::_init_scanners(std::list<vectorized::VScannerSPtr>* s

if (config::is_cloud_mode()) {
int64_t duration_ns = 0;
SCOPED_RAW_TIMER(&duration_ns);
std::vector<std::function<Status()>> tasks;
tasks.reserve(_scan_ranges.size());
for (auto&& [tablet, version] : tablets) {
tasks.emplace_back([tablet, version]() {
return std::dynamic_pointer_cast<CloudTablet>(tablet)->sync_rowsets(version);
});
{
SCOPED_RAW_TIMER(&duration_ns);
std::vector<std::function<Status()>> tasks;
tasks.reserve(_scan_ranges.size());
for (auto&& [tablet, version] : tablets) {
tasks.emplace_back([tablet, version]() {
return std::dynamic_pointer_cast<CloudTablet>(tablet)->sync_rowsets(version);
});
}
RETURN_IF_ERROR(cloud::bthread_fork_join(tasks, 10));
}
RETURN_IF_ERROR(cloud::bthread_fork_join(tasks, 10));
_sync_rowset_timer->update(duration_ns);
}

Expand Down

0 comments on commit 720a0f3

Please sign in to comment.