I met a check failed here:
incubator-doris/be/src/olap/cumulative_compaction.cpp
Lines 122 to 123 in 76a04de
| | CHECK(candidate_rowsets.size() == transient_size) |
| | << "tablet: " << _tablet->full_name() << ", "<< candidate_rowsets.size() << " vs. " << transient_size; |
The root cause is the wrong config:config::min_cumulative_compaction_num_singleton_deltas > max_cumulative_compaction_num_singleton_deltas
So in pick_input_rowset(), we may get an _input_rowsets(size>= max_compaction_score). And clear _input_rowsets in here:
incubator-doris/be/src/olap/cumulative_compaction_policy.cpp
Lines 359 to 361 in a7422ee
| | if (last_delete_version->first == -1 && *compaction_score < min_compaction_score) { |
| | input_rowsets->clear(); |
| | } |
because min_compaction_score > max_compaction_score
.
So we may get an empty _input_rowsets & transient_size=max_compaction_score<condidate_size
& _last_delete_version.first == -1
. And then, go to the CHECK(candidate_rowsets.size() == transient_size)
.
There are two approaches to this.
- check min&max_compaction_score in pick_input_rowset(), cuz they are mutable configs, and can't check when update config.
- delete this CHECK. Actually, I don't understand why we need
candidate_rowsets.size() == transient_size)
. Dose it means we need to ensure it must loop through the candidate_rowsets? If so, it should be more readable.
1条答案
按热度按时间cwxwcias1#
This PR is aim to implement the 1st approach, #4423