[Enhancement] Garbage collection of unused data on remote storage backend (#10731)

* [Feature](cold_on_s3) support unused remote rowset gc

* return aborted when skip drop tablet

* perform unused remote rowset gc
This commit is contained in:
plat1ko
2022-07-29 14:38:39 +08:00
committed by GitHub
parent eb4721cd80
commit a6537a90cd
37 changed files with 446 additions and 215 deletions

View File

@ -283,10 +283,12 @@ public class BackendLoadStatistic {
// Else if capacity used percent > 75%, set capacityCoefficient to 1.
// Else, capacityCoefficient changed smoothly from 0.5 to 1 with used capacity increasing
// Function: (2 * usedCapacityPercent - 0.5)
loadScore.capacityCoefficient = usedCapacityPercent < 0.5 ? 0.5
: (usedCapacityPercent > Config.capacity_used_percent_high_water ? 1.0
: (2 * usedCapacityPercent - 0.5));
loadScore.replicaNumCoefficient = 1 - loadScore.capacityCoefficient;
if (!Config.be_rebalancer_fuzzy_test) {
loadScore.capacityCoefficient = usedCapacityPercent < 0.5 ? 0.5
: (usedCapacityPercent > Config.capacity_used_percent_high_water ? 1.0
: (2 * usedCapacityPercent - 0.5));
loadScore.replicaNumCoefficient = 1 - loadScore.capacityCoefficient;
}
loadScore.score = capacityProportion * loadScore.capacityCoefficient
+ replicaNumProportion * loadScore.replicaNumCoefficient;

View File

@ -1685,7 +1685,7 @@ public class Config extends ConfigBase {
* It's used to test the reliability in single replica case when tablet scheduling are frequent.
* Default is false.
*/
@ConfField(mutable = false, masterOnly = true)
@ConfField(mutable = true, masterOnly = true)
public static boolean be_rebalancer_fuzzy_test = false;
/**