Skip to content

Commit 99d9fb5

Browse files
authored
Merge pull request ceph#62704 from sseshasa/wip-fix-recovery-counters-calc
osd/scheduler/OpSchedulerItem: Fix calculation of recovery latency counters
2 parents d4fb498 + 9a246e4 commit 99d9fb5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/osd/scheduler/OpSchedulerItem.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ void PGRecovery::run(
181181
{
182182
osd->logger->tinc(
183183
l_osd_recovery_queue_lat,
184-
time_queued - ceph_clock_now());
184+
ceph_clock_now() - time_queued);
185185
osd->do_recovery(pg.get(), epoch_queued, reserved_pushes, priority, handle);
186186
pg->unlock();
187187
}
@@ -194,7 +194,7 @@ void PGRecoveryContext::run(
194194
{
195195
osd->logger->tinc(
196196
l_osd_recovery_context_queue_lat,
197-
time_queued - ceph_clock_now());
197+
ceph_clock_now() - time_queued);
198198
c.release()->complete(handle);
199199
pg->unlock();
200200
}
@@ -214,7 +214,7 @@ void PGRecoveryMsg::run(
214214
PGRef& pg,
215215
ThreadPool::TPHandle &handle)
216216
{
217-
auto latency = time_queued - ceph_clock_now();
217+
auto latency = ceph_clock_now() - time_queued;
218218
switch (op->get_req()->get_type()) {
219219
case MSG_OSD_PG_PUSH:
220220
osd->logger->tinc(l_osd_recovery_push_queue_lat, latency);

0 commit comments

Comments
 (0)