Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions be/src/olap/olap_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1903,7 +1903,23 @@ OLAPTablePtr OLAPEngine::_find_best_tablet_to_compaction(CompactionType compacti
if (!table_ptr->is_used() || !table_ptr->is_loaded() || !_can_do_compaction(table_ptr)) {
continue;
}

if (compaction_type == CompactionType::CUMULATIVE_COMPACTION) {
if (!table_ptr->try_cumulative_lock()) {
continue;
} else {
table_ptr->release_cumulative_lock();
}
}

if (compaction_type == CompactionType::BASE_COMPACTION) {
if (!table_ptr->try_base_compaction_lock()) {
continue;
} else {
table_ptr->release_base_compaction_lock();
}
}

if (now - table_ptr->last_compaction_failure_time() <= config::min_compaction_failure_interval_sec * 1000) {
LOG(INFO) << "tablet last compaction failure time is: " << table_ptr->last_compaction_failure_time()
<< ", skip it";
Expand Down
1 change: 1 addition & 0 deletions be/src/olap/segment_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ OLAPStatus SegmentGroup::add_short_key(const RowCursor& short_key, const uint32_
_check_io_error(res);
return res;
}
_file_created = true;
_new_segment_created = true;

// 准备FileHeader
Expand Down