static string mdlog_sync_status_shard_prefix = "mdlog.sync-status.shard";
static string mdlog_sync_full_sync_index_prefix = "meta.full-sync.index";
+static const string meta_sync_bids_oid = "meta-sync-bids";
+
RGWContinuousLeaseCR::~RGWContinuousLeaseCR() {}
RGWSyncErrorLogger::RGWSyncErrorLogger(rgw::sal::RadosStore* _store, const string &oid_prefix, int _num_shards) : store(_store), num_shards(_num_shards) {
return -EINVAL;
}
+ // construct and start the bid manager for sync fairness
+ const auto& control_pool = store->svc()->zone->get_zone_params().control_pool;
+ auto control_obj = rgw_raw_obj{control_pool, meta_sync_bids_oid};
+
+ auto bid_manager = rgw::sync_fairness::create_rados_bid_manager(
+ store, control_obj, num_shards);
+ r = bid_manager->start();
+ if (r < 0) {
+ return r;
+ }
+ sync_env.bid_manager = bid_manager.get();
+
RGWPeriodHistory::Cursor cursor;
do {
r = run(dpp, new RGWReadSyncStatusCoroutine(&sync_env, &sync_status));
#include "rgw_sal_rados.h"
#include "rgw_sync_trace.h"
#include "rgw_mdlog.h"
+#include "sync_fairness.h"
#define ERROR_LOGGER_SHARDS 32
#define RGW_SYNC_ERROR_LOG_SHARD_PREFIX "sync.error-log"
RGWHTTPManager *http_manager{nullptr};
RGWSyncErrorLogger *error_logger{nullptr};
RGWSyncTraceManager *sync_tracer{nullptr};
+ rgw::sync_fairness::BidManager* bid_manager{nullptr};
RGWMetaSyncEnv() {}
http_manager(store->ctx(), completion_mgr),
status_manager(_sm) {}
- virtual ~RGWRemoteMetaLog() override;
+ ~RGWRemoteMetaLog() override;
int init();
void finish();