From 8dbcb175e46fc63a5efa40c03cea49dceba40e26 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 6 Mar 2025 10:41:39 -0500 Subject: [PATCH] rgw: sync fairness watcher reconnects on any error other implementations of librados::WatchCtx2 in radosgw reconnect the watch on any error code, not just -ENOTCONN Fixes: https://tracker.ceph.com/issues/70270 Signed-off-by: Casey Bodley --- src/rgw/driver/rados/sync_fairness.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/rgw/driver/rados/sync_fairness.cc b/src/rgw/driver/rados/sync_fairness.cc index 1ac27f4bacc..a54a6ab2f15 100644 --- a/src/rgw/driver/rados/sync_fairness.cc +++ b/src/rgw/driver/rados/sync_fairness.cc @@ -219,10 +219,9 @@ class Watcher : public librados::WatchCtx2 { if (cookie != handle) { return; } - if (err == -ENOTCONN) { - ldpp_dout(dpp, 4) << "Disconnected watch on " << ref.obj << dendl; - restart(); - } + ldpp_dout(dpp, 4) << "Disconnected watch on " << ref.obj + << " err=" << err << dendl; + restart(); } }; // Watcher -- 2.39.5