morningman commented on a change in pull request #6671:
URL: https://github.com/apache/incubator-doris/pull/6671#discussion_r715440488
##########
File path: be/src/olap/olap_server.cpp
##########
@@ -394,7 +394,7 @@ void StorageEngine::_compaction_tasks_producer_callback() {
for (const auto& tablet : tablets_compaction) {
int64_t permits =
tablet->prepare_compaction_and_calculate_permits(compaction_type, tablet);
- if (permits > 0 && _permit_limiter.request(permits)) {
+ if (permits >= 0 && _permit_limiter.request(permits)) {
Review comment:
What is (permit == 0) means?
##########
File path: be/src/olap/cumulative_compaction_policy.cpp
##########
@@ -390,23 +427,37 @@ int
NumBasedCumulativeCompactionPolicy::pick_input_rowsets(
// if we have a sufficient number of segments,
// or have other versions before encountering the delete version, we
should process the compaction.
- if (last_delete_version->first == -1 && *compaction_score <
min_compaction_score) {
+ if (last_delete_version->first == -1 && (*compaction_score +
empty_rowset_num
+ / config::empty_rowset_compaction_score_ratio) <
min_compaction_score) {
input_rowsets->clear();
+ *compaction_score = 0;
+ empty_rowset_num = 0;
}
+
+ *compaction_score += empty_rowset_num /
config::empty_rowset_compaction_score_ratio;
Review comment:
Move this in front of `if`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]