Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix](core) Fix segment cache core when output rowset is nullptr #24778

Merged
merged 3 commits into from Sep 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions be/src/olap/compaction.cpp
Expand Up @@ -134,7 +134,7 @@ Status Compaction::do_compaction(int64_t permits) {
<< ", before=" << checksum_before << ", checksum_after=" << checksum_after;
}
}
_load_segment_to_cache();
RETURN_IF_ERROR(_load_segment_to_cache());
Yukang-Lian marked this conversation as resolved.
Show resolved Hide resolved
return st;
}

Expand Down Expand Up @@ -831,10 +831,12 @@ int64_t Compaction::get_compaction_permits() {
}

Status Compaction::_load_segment_to_cache() {
// Load new rowset's segments to cache.
SegmentCacheHandle handle;
RETURN_IF_ERROR(SegmentLoader::instance()->load_segments(
std::static_pointer_cast<BetaRowset>(_output_rowset), &handle, true));
if (_output_rowset != nullptr) {
// Load new rowset's segments to cache.
SegmentCacheHandle handle;
RETURN_IF_ERROR(SegmentLoader::instance()->load_segments(
std::static_pointer_cast<BetaRowset>(_output_rowset), &handle, true));
}
return Status::OK();
}

Expand Down