]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: sync fairness watcher reconnects on any error
authorCasey Bodley <cbodley@redhat.com>
Thu, 6 Mar 2025 15:41:39 +0000 (10:41 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 18 Mar 2025 15:00:24 +0000 (11:00 -0400)
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 <cbodley@redhat.com>
(cherry picked from commit 8dbcb175e46fc63a5efa40c03cea49dceba40e26)

src/rgw/driver/rados/sync_fairness.cc

index 1ac27f4bacc883e3b89605f29a46d2d348b62607..a54a6ab2f153ae85df2f407cde5038b4f7d45a11 100644 (file)
@@ -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