Skip to content

Commit

Permalink
[BugFix] Always check memory limit during preload segment (#52231)
Browse files Browse the repository at this point in the history
Signed-off-by: sevev <qiangzh95@gmail.com>
(cherry picked from commit 0caa97a)
  • Loading branch information
sevev authored and mergify[bot] committed Oct 24, 2024
1 parent 4933c4e commit 814c2b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion be/src/storage/tablet_updates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ DEFINE_FAIL_POINT(tablet_apply_load_compaction_state_failed);
DEFINE_FAIL_POINT(tablet_apply_load_segments_failed);

void TabletUpdates::do_apply() {
SCOPED_THREAD_LOCAL_CHECK_MEM_LIMIT_SETTER(config::enable_pk_strict_memcheck);
SCOPED_THREAD_LOCAL_CHECK_MEM_LIMIT_SETTER(true);
SCOPED_THREAD_LOCAL_SINGLETON_CHECK_MEM_TRACKER_SETTER(
config::enable_pk_strict_memcheck ? StorageEngine::instance()->update_manager()->mem_tracker() : nullptr);
// only 1 thread at max is running this method
Expand Down
2 changes: 1 addition & 1 deletion be/src/storage/update_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ Status UpdateManager::set_cached_del_vec(const TabletSegmentId& tsid, const DelV

DEFINE_FAIL_POINT(on_rowset_finished_failed_due_to_mem);
Status UpdateManager::on_rowset_finished(Tablet* tablet, Rowset* rowset) {
SCOPED_THREAD_LOCAL_MEM_SETTER(GlobalEnv::GetInstance()->process_mem_tracker(), config::enable_pk_strict_memcheck);
SCOPED_THREAD_LOCAL_MEM_SETTER(GlobalEnv::GetInstance()->process_mem_tracker(), true);
SCOPED_THREAD_LOCAL_SINGLETON_CHECK_MEM_TRACKER_SETTER(config::enable_pk_strict_memcheck ? mem_tracker() : nullptr);
if (!rowset->has_data_files() || tablet->tablet_state() == TABLET_NOTREADY) {
// if rowset is empty or tablet is in schemachange, we can skip preparing updatestates and pre-loading primary index
Expand Down

0 comments on commit 814c2b3

Please sign in to comment.