From e04fad0ee43eb2edf1a1d63e2bc0e95caf209caf Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 13 Dec 2011 14:33:08 +0100 Subject: [PATCH] vacuum: add new tunable VacuumInterval and mark Vacuum{Default,Min,Max}Interval obsolete And use VacuumInterval instead of VacuumDefaultInterval in the code. (This used to be ctdb commit 78530f40338f511a7cd1d33ada450905742bfa8f) --- ctdb/include/ctdb_private.h | 1 + ctdb/server/ctdb_tunables.c | 7 ++++--- ctdb/server/ctdb_vacuum.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 547ad388c9e..92d498aaf7e 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -108,6 +108,7 @@ struct ctdb_tunable { uint32_t reclock_latency_ms; uint32_t recovery_drop_all_ips; uint32_t verify_recovery_lock; + uint32_t vacuum_interval; uint32_t vacuum_default_interval; uint32_t vacuum_max_run_time; uint32_t repack_limit; diff --git a/ctdb/server/ctdb_tunables.c b/ctdb/server/ctdb_tunables.c index cfc80e5ca9b..170a58af7fe 100644 --- a/ctdb/server/ctdb_tunables.c +++ b/ctdb/server/ctdb_tunables.c @@ -57,12 +57,13 @@ static const struct { { "RecLockLatencyMs", 1000, offsetof(struct ctdb_tunable, reclock_latency_ms) }, { "RecoveryDropAllIPs", 120, offsetof(struct ctdb_tunable, recovery_drop_all_ips) }, { "VerifyRecoveryLock", 1, offsetof(struct ctdb_tunable, verify_recovery_lock) }, - { "VacuumDefaultInterval", 10, offsetof(struct ctdb_tunable, vacuum_default_interval) }, + { "VacuumInterval", 10, offsetof(struct ctdb_tunable, vacuum_interval) }, + { "VacuumDefaultInterval", 10, offsetof(struct ctdb_tunable, vacuum_default_interval) }, /* OBSOLETE */ { "VacuumMaxRunTime", 30, offsetof(struct ctdb_tunable, vacuum_max_run_time) }, { "RepackLimit", 10000, offsetof(struct ctdb_tunable, repack_limit) }, { "VacuumLimit", 5000, offsetof(struct ctdb_tunable, vacuum_limit) }, - { "VacuumMinInterval", 10, offsetof(struct ctdb_tunable, vacuum_min_interval) }, - { "VacuumMaxInterval", 10, offsetof(struct ctdb_tunable, vacuum_max_interval) }, + { "VacuumMinInterval", 10, offsetof(struct ctdb_tunable, vacuum_min_interval) }, /* OBSOLETE */ + { "VacuumMaxInterval", 10, offsetof(struct ctdb_tunable, vacuum_max_interval) }, /* OBSOLETE */ { "VacuumFastPathCount", 60, offsetof(struct ctdb_tunable, vacuum_fast_path_count) }, { "MaxQueueDropMsg", 1000000, offsetof(struct ctdb_tunable, max_queue_depth_drop_msg) }, { "UseStatusEvents", 0, offsetof(struct ctdb_tunable, use_status_events_for_monitoring) }, diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c index 49f11775989..88be4a89329 100644 --- a/ctdb/server/ctdb_vacuum.c +++ b/ctdb/server/ctdb_vacuum.c @@ -920,7 +920,7 @@ static int ctdb_vacuum_and_repack_db(struct ctdb_db_context *ctdb_db, static int get_vacuum_interval(struct ctdb_db_context *ctdb_db) { - uint interval = ctdb_db->ctdb->tunable.vacuum_default_interval; + uint interval = ctdb_db->ctdb->tunable.vacuum_interval; return interval; }