]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMapMapping: fix spurious threadpool timeout errors 44546/head
authorSage Weil <sage@newdream.net>
Mon, 6 Dec 2021 18:12:50 +0000 (13:12 -0500)
committerCory Snyder <csnyder@iland.com>
Fri, 4 Feb 2022 09:52:30 +0000 (04:52 -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>
(cherry picked from commit 30ac5e79352839e285ec2eef6d603226d9071db4)

Conflicts:
src/osd/OSDMapMapping.h

Cherry-pick notes:
- Octopus was passing integer 0 as WorkQueue time_t args vs. ceph::timespan::zero()

src/common/WorkQueue.cc
src/osd/OSDMapMapping.h

index 93b2aadd8a887f495650d6e34fac99923b3a6561..e94af5b0e29d836ce4688613cd4b56d000b48348 100644 (file)
@@ -99,7 +99,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 37ec74f6f50b55cf8849291a1d51ba9e8b138e7e..8ca6a439f25700c48df2d25fd4cf25f150e433c9 100644 (file)
@@ -115,7 +115,11 @@ protected:
     ParallelPGMapper *m;
 
     WQ(ParallelPGMapper *m_, ThreadPool *tp)
-      : ThreadPool::WorkQueue<Item>("ParallelPGMapper::WQ", 0, 0, tp),
+      : ThreadPool::WorkQueue<Item>(
+       "ParallelPGMapper::WQ",
+       m_->cct->_conf->threadpool_default_timeout,
+       0,
+       tp),
         m(m_) {}
 
     bool _enqueue(Item *i) override {