From: Sage Weil Date: Tue, 11 Apr 2017 18:05:36 +0000 (-0400) Subject: osd/PG: put interval bounds [) in debug/log output X-Git-Tag: v12.0.3~129^2~25 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f2a13dc0d791993df374bf586c2373915d454bae;p=ceph.git osd/PG: put interval bounds [) in debug/log output Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 7f70424095b4..313272f071e9 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -724,21 +724,21 @@ void PG::check_past_interval_bounds() const osd->get_superblock().oldest_map); if (rpib.first == rpib.second) { if (!past_intervals.empty()) { - osd->clog->error() << info.pgid << " required past_interval bounds are " - << " empty " << rpib << " but past_intervals is not " + osd->clog->error() << info.pgid << " required past_interval bounds are" + << " empty [" << rpib << ") but past_intervals is not " << past_intervals; derr << info.pgid << " required past_interval bounds are " - << " empty " << rpib << " but past_intervals is not " + << " empty [" << rpib << ") but past_intervals is not " << past_intervals << dendl; assert(past_intervals.empty()); } } if (past_intervals.empty()) { - osd->clog->error() << info.pgid << " required past_interval bounds are " - << " not empty " << rpib << " but past_intervals " + osd->clog->error() << info.pgid << " required past_interval bounds are" + << " not empty [" << rpib << ") but past_intervals " << past_intervals << " is empty"; derr << info.pgid << " required past_interval bounds are " - << " not empty " << rpib << " but past_intervals " + << " not empty [" << rpib << ") but past_intervals " << past_intervals << " is empty" << dendl; assert(!past_intervals.empty()); } @@ -746,21 +746,21 @@ void PG::check_past_interval_bounds() const if ((apib.first.first > rpib.first) || (apib.first.second <= rpib.first)) { - osd->clog->error() << info.pgid << " past_intervals " << apib - << " start interval does not contain the required" - << " bound " << rpib << " start"; - derr << info.pgid << " past_intervals " << apib - << " start interval does not contain the required" - << " bound " << rpib << " start" << dendl; + osd->clog->error() << info.pgid << " past_intervals [" << apib + << ") start interval does not contain the required" + << " bound [" << rpib << ") start"; + derr << info.pgid << " past_intervals [" << apib + << ") start interval does not contain the required" + << " bound [" << rpib << ") start" << dendl; assert(0 == "past_interval start interval mismatch"); } if (apib.second != rpib.second) { - osd->clog->error() << info.pgid << " past_interal bound " << apib - << " end does not match required " << rpib - << " end"; - derr << info.pgid << " past_interal bound " << apib - << " end does not match required " << rpib - << " end" << dendl; + osd->clog->error() << info.pgid << " past_interal bound [" << apib + << ") end does not match required [" << rpib + << ") end"; + derr << info.pgid << " past_interal bound [" << apib + << ") end does not match required [" << rpib + << ") end" << dendl; assert(0 == "past_interval end mismatch"); } } diff --git a/src/osd/PG.h b/src/osd/PG.h index 0908f929a784..9614444b184c 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -908,6 +908,7 @@ public: void mark_clean(); ///< mark an active pg clean + /// return [start,end) bounds for required past_intervals static pair get_required_past_interval_bounds( const pg_info_t &info, epoch_t oldest_map) { diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 849e66b4f264..c95e24cbd391 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -2712,7 +2712,7 @@ public: } /* Return the set of epochs - * [(start_interval_start, start_interval_end), end) represented by the + * [[start_interval_start, start_interval_end), end) represented by the * past_interval set. Annoyingly, pg_info_t records last_epoch_started, * but doesn't pin it to the start of the interval, so we have to return * the first interval so a user can verify that last_epoch_started falls