From 7839519a18c5789ebd7579a674c14cf353c3e027 Mon Sep 17 00:00:00 2001 From: Oguzhan Ozmen Date: Wed, 29 Apr 2026 21:36:48 +0000 Subject: [PATCH] rgw/multisite: concurrency adjustment - consider the case caller provides 1 Signed-off-by: Oguzhan Ozmen --- src/rgw/driver/rados/rgw_data_sync.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rgw/driver/rados/rgw_data_sync.h b/src/rgw/driver/rados/rgw_data_sync.h index d26532f9971c..ff584bb92365 100644 --- a/src/rgw/driver/rados/rgw_data_sync.h +++ b/src/rgw/driver/rados/rgw_data_sync.h @@ -3,6 +3,7 @@ #pragma once +#include #include #include @@ -357,10 +358,10 @@ public: << "WARNING: sync lock latency elevated, halving concurrency." << " avg_latency_ms=" << std::chrono::duration_cast(avg_latency()).count() << " threshold_ms=" << std::chrono::duration_cast(threshold).count() - << " concurrency=" << (concurrency / 2) << dendl; + << " concurrency=" << std::max(int64_t{1}, concurrency / 2) << dendl; state = State::Throttled; } - return concurrency / 2; + return std::max(int64_t{1}, concurrency / 2); } else [[likely]] { if (state != State::Normal) [[unlikely]] { ldout(cct, 1) -- 2.47.3