Skip to content

Commit

Permalink
Fix scanner resersve memory size
Browse files Browse the repository at this point in the history
  • Loading branch information
jacktengg committed Dec 27, 2024
1 parent fd5fd00 commit 962ddef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion be/src/olap/memtable_flush_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Status FlushToken::_try_reserve_memory(QueryThreadContext query_thread_context,
if (memtable_flush_executor->check_and_inc_has_any_flushing_task()) {
// If there are already any flushing task, Wait for some time and retry.
LOG_EVERY_T(INFO, 60) << fmt::format(
"Failed to reserve memory {} for flush memtable, retry after 100ms", size);
"Failed to reserve memory {} for flush memtable, retry after 100ms", PrettyPrinter::print_bytes(size));
std::this_thread::sleep_for(std::chrono::milliseconds(100));
} else {
st = Status::OK();
Expand Down
2 changes: 1 addition & 1 deletion be/src/vec/exec/scan/scanner_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ void ScannerScheduler::_scanner_scan(std::shared_ptr<ScannerContext> ctx,
}
if (scan_task->cached_blocks.back().first->rows() > 0) {
auto block_avg_bytes =
(scan_task->cached_blocks.back().first->allocated_bytes() +
(scan_task->cached_blocks.back().first->bytes() +
scan_task->cached_blocks.back().first->rows() - 1) /
scan_task->cached_blocks.back().first->rows() * ctx->batch_size();
scanner->update_block_avg_bytes(block_avg_bytes);
Expand Down

0 comments on commit 962ddef

Please sign in to comment.