Ashwani Raina has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24932
Change subject: [tablet] make tablet_compaction_budget_mb a runtime flag ...................................................................... [tablet] make tablet_compaction_budget_mb a runtime flag FLAGS_tablet_compaction_budget_mb previously required a tablet-server restart to take effect. This change makes it a runtime flag so that operators can adjust the compaction budget without restarting. BudgetedCompactionPolicy now stores the budget in size_budget_mb_, which is initialised at construction time and refreshed at the top of every PickRowSets() call. This ensures that RunApproximation() and RunExact() both see a consistent, immutable budget for the duration of a single compaction selection, while any runtime change to the flag is picked up on the next selection. Newly added test (i.e., TestFlagDrivesPickRowSets) verifies the end-to-end behaviour: lowering the budget to 1 MB causes PickRowSets to select no rowsets (no merge benefit for a single rowset), and raising it to 4 MB causes all three overlapping rowsets to be selected. Change-Id: Id0515daff32d952cc9dc45d604cf41bf6018d403 --- M src/kudu/tablet/compaction_policy-test.cc M src/kudu/tablet/compaction_policy.cc M src/kudu/tablet/compaction_policy.h M src/kudu/tablet/tablet.cc M src/kudu/tablet/tablet.h 5 files changed, 113 insertions(+), 12 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/32/24932/1 -- To view, visit http://gerrit.cloudera.org:8080/24932 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id0515daff32d952cc9dc45d604cf41bf6018d403 Gerrit-Change-Number: 24932 Gerrit-PatchSet: 1 Gerrit-Owner: Ashwani Raina <[email protected]>
