Alexey Serbin has submitted this change and it was merged. ( 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 Reviewed-on: http://gerrit.cloudera.org:8080/24932 Tested-by: Ashwani Raina <[email protected]> Reviewed-by: Marton Greber <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> --- M src/kudu/integration-tests/timestamp_advancement-itest.cc 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 6 files changed, 114 insertions(+), 14 deletions(-) Approvals: Ashwani Raina: Verified Marton Greber: Looks good to me, but someone else must approve Alexey Serbin: Looks good to me, approved -- 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: merged Gerrit-Change-Id: Id0515daff32d952cc9dc45d604cf41bf6018d403 Gerrit-Change-Number: 24932 Gerrit-PatchSet: 3 Gerrit-Owner: Ashwani Raina <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Ashwani Raina <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]>
