diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 6e8300bec97..5029567ee00 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -5201,10 +5201,11 @@ void OSD::process_peering_events(const list &pgs) pg->peering_queue.pop_front(); pg->handle_peering_event(evt, &rctx); } - dispatch_context_transaction(rctx, pg); need_up_thru = pg->need_up_thru || need_up_thru; same_interval_since = MAX(pg->info.history.same_interval_since, same_interval_since); + pg->write_if_dirty(*rctx.transaction); + dispatch_context_transaction(rctx, pg); pg->unlock(); } if (need_up_thru) diff --git a/src/osd/PG.h b/src/osd/PG.h index 2348cefe709..710c0bd5c53 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -356,6 +356,8 @@ public: void lock(bool no_lockdep = false); void unlock() { //generic_dout(0) << this << " " << info.pgid << " unlock" << dendl; + assert(!dirty_info); + assert(!dirty_log); _lock.Unlock(); }