pg.wait_for_active_blocker,
&decltype(pg.wait_for_active_blocker)::wait));
+ if (int res = op_info.set_from_op(&*m, *pg.get_osdmap());
+ res != 0) {
+ co_await reply_op_error(pgref, res);
+ co_return;
+ }
+
+ if (!pg.is_primary()) {
+ // primary can handle both normal ops and balanced reads
+ if (is_misdirected(pg)) {
+ DEBUGDPP("{}.{}: dropping misdirected op",
+ pg, *this, this_instance_id);
+ co_return;
+ } else if (const hobject_t& hoid = m->get_hobj();
+ !pg.get_peering_state().can_serve_replica_read(hoid)) {
+ DEBUGDPP("{}.{}: unstable write on replica, bouncing to primary",
+ pg, *this, this_instance_id);
+ co_await reply_op_error(pgref, -EAGAIN);
+ co_return;
+ } else {
+ DEBUGDPP("{}.{}: serving replica read on oid {}",
+ pg, *this, this_instance_id, m->get_hobj());
+ }
+ }
+
DEBUGDPP("{}.{}: pg active, entering process[_pg]_op",
*pgref, *this, this_instance_id);
DEBUGDPP("{}.{}: entered get_obc stage, about to wait_scrub",
*pg, *this, this_instance_id);
- if (int res = op_info.set_from_op(&*m, *pg->get_osdmap());
- res != 0) {
- co_await reply_op_error(pg, res);
- co_return;
- }
co_await ihref.enter_blocker(
*this, pg->scrubber, &decltype(pg->scrubber)::wait_scrub,
m->get_hobj());
co_return;
}
- if (!pg->is_primary()) {
- // primary can handle both normal ops and balanced reads
- if (is_misdirected(*pg)) {
- DEBUGDPP("{}.{}: dropping misdirected op",
- *pg, *this, this_instance_id);
- co_return;
- } else if (const hobject_t& hoid = m->get_hobj();
- !pg->get_peering_state().can_serve_replica_read(hoid)) {
- DEBUGDPP("{}.{}: unstable write on replica, bouncing to primary",
- *pg, *this, this_instance_id);
- co_await reply_op_error(pg, -EAGAIN);
- co_return;
- } else {
- DEBUGDPP("{}.{}: serving replica read on oid {}",
- *pg, *this, this_instance_id, m->get_hobj());
- }
- }
-
auto [submitted, all_completed] = co_await pg->do_osd_ops(
m, r_conn, obc, op_info, snapc
);