]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: MDSMonitor: implement 'get_trim_to()' to let the mon trim mdsmaps
authorJoao Eduardo Luis <joao.luis@inktank.com>
Wed, 4 Dec 2013 17:49:10 +0000 (17:49 +0000)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Thu, 5 Dec 2013 17:47:37 +0000 (17:47 +0000)
commitcf099415ad5ad7560a33efd0016293becc70858a
tree008da45bb2099831407f4f51962aae78b1fa84a5
parent3e845b56a3c4a62c5e635ace1174f4421fd42aa6
mon: MDSMonitor: implement 'get_trim_to()' to let the mon trim mdsmaps

This commit also adds two options to the MDSMonitor:

  - mon_max_mdsmap_epochs: the maximum amount of maps we'll keep (def: 500)
  - mon_mds_force_trim: the version we want to trim to

This results in 'get_trim_to()' returning the possible values:

  - if we have set mon_mds_force_trim, and this value is greater than the
    last committed version, trim to mon_mds_force_trim
  - if we hold more than the max number of maps, trim to last - max
  - if we have set mon_mds_force_trim and if we hold more than the max
    number of maps, and mon_mds_force_trim is lower than last - max,
    then trim to last - max

Backport: dumpling
Backport: emperor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/common/config_opts.h
src/mon/MDSMonitor.cc
src/mon/MDSMonitor.h