Skip to content

Commit

Permalink
[BugFix] Check the datacache usability before calling its function in…
Browse files Browse the repository at this point in the history
… case that the uninitialized members are called in some cases.

Signed-off-by: GavinMar <[email protected]>
  • Loading branch information
GavinMar committed Sep 19, 2024
1 parent a051e48 commit 5d1eba2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion be/src/runtime/exec_env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ void ExecEnv::try_release_resource_before_core_dump() {
storage_page_cache->set_capacity(0);
LOG(INFO) << "release storage page cache memory";
}
if (_block_cache != nullptr && need_release("data_cache")) {
if (_block_cache != nullptr && _block_cache->available() && need_release("data_cache")) {
// TODO: Currently, block cache don't support shutdown now,
// so here will temporary use update_mem_quota instead to release memory.
(void)_block_cache->update_mem_quota(0, false);
Expand Down

0 comments on commit 5d1eba2

Please sign in to comment.