[compaction][config] Change default config policy to size_based (#4599)

(1) change default compaction config policy to size_based
(2) change missed version check policy when delete stale rowsets
This commit is contained in:
ZhangYu0123
2020-09-16 15:04:06 +08:00
committed by GitHub
parent a88782e0c5
commit 4f7cfee908
2 changed files with 8 additions and 1 deletions

View File

@ -279,7 +279,7 @@ namespace config {
// num_based policy, the original version of cumulative compaction, cumulative version compaction once.
// size_based policy, a optimization version of cumulative compaction, targeting the use cases requiring
// lower write amplification, trading off read amplification and space amplification.
CONF_String(cumulative_compaction_policy, "num_based");
CONF_String(cumulative_compaction_policy, "size_based");
// In size_based policy, output rowset of cumulative compaction total disk size exceed this config size,
// this rowset will be given to base compaction, unit is m byte.

View File

@ -445,6 +445,13 @@ void Tablet::delete_expired_stale_rowset() {
std::vector<Version> missed_versions;
calc_missed_versions_unlocked(lastest_delta->end_version(), &missed_versions);
if (!missed_versions.empty()) {
LOG(WARNING) << "tablet:" << full_name() << ", missed version for version:"
<< lastest_delta->end_version();
_print_missed_versions(missed_versions);
return;
}
// do check consistent operation
auto path_id_iter = path_id_vec.begin();