]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
PGLog: create interface allowing interface user to cleanup/rollback
authorSamuel Just <sam.just@inktank.com>
Mon, 9 Dec 2013 03:36:51 +0000 (19:36 -0800)
committerSamuel Just <sam.just@inktank.com>
Wed, 22 Jan 2014 22:39:16 +0000 (14:39 -0800)
commit25eced59a8d299cf53a49610218f6edc60df06f7
tree361e9fe57bf386cb0d21b40e10a178165d577230
parentc98cb1ce7466c84124559f98927d8ca728bd50d2
PGLog: create interface allowing interface user to cleanup/rollback

We need to be able to allow the PGLog interface user to provide
logic for rolling back and trimming log entries.  To that end,
serveral PGLog methods now take a LogEntryHander.

In PGLog::merge_old_entry, if prior_version > info.log_tail and
the object is not missing, we must have rolled back the prior
log entry.  Thus, we don't skip the entry.

To simplify the code, _merge_old_entry has been split out as
a const helper.  This way, proc_replica_log can be reexpressed
as merging the divergent replica log entries with the fully
merged authoritative log.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/OSD.cc
src/osd/PG.cc
src/osd/PG.h
src/osd/PGBackend.h
src/osd/PGLog.cc
src/osd/PGLog.h
src/osd/ReplicatedBackend.h
src/osd/osd_types.h
src/test/osd/TestPGLog.cc