Bug #2954
Consider the following case:
1) Primary calls share_pg_info()
2) Primary processes client op and sends off sub_op to replica
3) Replica process sub_op
4) Replica process info reverting stat to before 2)
Similarly:
1) Primary processes client op
2) Primary calls share_pg_info()
3) Replica processes info
[4) Replica processes sub_op]
If 4) is interrupted by a map change, we can end up in a case there
the replica's info has a stat which reflects a log entry which
is not there. If that logs ends up authoratative, the most recent
op will be replayed and end up double counted in the log.
There should actually be no cases where the stats change after the
replica goes active except for as part of a sub_op_modify. Thus,
ReplicaActive::MInfoRec should not update the stats.
Signed-off-by: Samuel Just <sam.just@inktank.com>
{
assert(!is_primary());
- if (info.last_backfill.is_max()) {
- info.stats = oinfo.stats;
- dirty_info = true;
- }
-
osd->unreg_last_pg_scrub(info.pgid, info.history.last_scrub_stamp);
if (info.history.merge(oinfo.history))
dirty_info = true;