]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMapMapping: fix spurious threadpool timeout errors 44225/head
authorSage Weil <sage@newdream.net>
Mon, 6 Dec 2021 18:12:50 +0000 (13:12 -0500)
committerSage Weil <sage@newdream.net>
Mon, 6 Dec 2021 18:13:06 +0000 (13:13 -0500)
We were passing a grace of zero seconds to our temporary work queue, which
led to the HeartbeatMap issuing cpu_tp timeout errors to the log.  By using
a non-zero grace period we can avoid these.  Use the same default grace
we use for the workqueue itself when it goes to sleep.

Fixes: https://tracker.ceph.com/issues/53506
Signed-off-by: Sage Weil <sage@newdream.net>
src/common/WorkQueue.cc
src/osd/OSDMapMapping.h

index f8e84aeae304f7864aa95151f681c000c4c50de4..ea7ff393902013dbb937af5122eef7b769ae1cab 100644 (file)
@@ -98,7 +98,9 @@ void ThreadPool::worker(WorkThread *wt)
       break;
     }
 
-    if (!_pause && !work_queues.empty()) {
+    if (work_queues.empty()) {
+      ldout(cct, 10) << "worker no work queues" << dendl;
+    } else if (!_pause) {
       WorkQueue_* wq;
       int tries = 2 * work_queues.size();
       bool did = false;
index 4025917d0ddc13d147ce8ff1a3ccc551d44ecbd2..216c30446a95a216230681f94feb73cf3f7db3bd 100644 (file)
@@ -115,10 +115,11 @@ protected:
     ParallelPGMapper *m;
 
     WQ(ParallelPGMapper *m_, ThreadPool *tp)
-      : ThreadPool::WorkQueue<Item>("ParallelPGMapper::WQ",
-                                   ceph::timespan::zero(),
-                                   ceph::timespan::zero(),
-                                   tp),
+      : ThreadPool::WorkQueue<Item>(
+       "ParallelPGMapper::WQ",
+       ceph::make_timespan(m_->cct->_conf->threadpool_default_timeout),
+       ceph::timespan::zero(),
+       tp),
         m(m_) {}
 
     bool _enqueue(Item *i) override {