From: Samuel Just Date: Wed, 18 Mar 2015 18:19:09 +0000 (-0700) Subject: PG: make sure to update history.last_epoch_started with first write X-Git-Tag: v0.94~28^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2da958464df4ea59eb5e4784f1dc670f8ac3fdfc;p=ceph.git PG: make sure to update history.last_epoch_started with first write Otherwise, we might remember the write, but not that the activation interval was history.last_epoch_started. Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index ee3903aafc87..cf72a86c41ce 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2911,6 +2911,15 @@ void PG::append_log( { if (transaction_applied) update_snap_map(logv, t); + + /* The primary has sent an info updating the history, but it may not + * have arrived yet. We want to make sure that we cannot remember this + * write without remembering that it happened in an interval which went + * active in epoch history.last_epoch_started. + */ + if (info.last_epoch_started != info.history.last_epoch_started) { + info.history.last_epoch_started = info.last_epoch_started; + } dout(10) << "append_log " << pg_log.get_log() << " " << logv << dendl; map keys;