crimson: take obc lock during push commit on primary#61561
crimson: take obc lock during push commit on primary#61561
Conversation
Should make it a bit easier to find the two kinds of message handlers. Signed-off-by: Samuel Just <sjust@redhat.com>
…ome formatting changes Signed-off-by: Samuel Just <sjust@redhat.com>
…ing changes Signed-off-by: Samuel Just <sjust@redhat.com>
…coroutine Signed-off-by: Samuel Just <sjust@redhat.com>
…coroutine Signed-off-by: Samuel Just <sjust@redhat.com>
…e to coroutine Signed-off-by: Samuel Just <sjust@redhat.com>
… to coroutine Signed-off-by: Samuel Just <sjust@redhat.com>
…object if complete Signed-off-by: Samuel Just <sjust@redhat.com>
…le_pull_response Signed-off-by: Samuel Just <sjust@redhat.com>
Avoids extra lookup. Signed-off-by: Samuel Just <sjust@redhat.com>
Signed-off-by: Samuel Just <sjust@redhat.com>
Already checked in handle_recovery_op. Signed-off-by: Samuel Just <sjust@redhat.com>
1a68b82 to
4e70fbb
Compare
|
jenkins test make check |
| if (pg.can_discard_replica_op(*m)) { | ||
| DEBUGDPP("discarding {}", pg, *m); | ||
| return seastar::now(); | ||
| } |
There was a problem hiding this comment.
The same can be applied for pull/pull_response, right?
There was a problem hiding this comment.
Good call, but it can be a future PR
| if (pg.is_primary()) { | ||
| return handle_pull_response( | ||
| boost::static_pointer_cast<MOSDPGPush>(m)); | ||
| } else { | ||
| return handle_push(boost::static_pointer_cast<MOSDPGPush>(m)); | ||
| } |
There was a problem hiding this comment.
nit:
crimson/.../replicated_recovery_backend: route pull_response earlier
Let ReplicatedRecoveryBackend::handle_recovery_op route
pull_responses instead of ReplicatedRecoveryBackend::handle_push.
| pull_info.stat.num_objects_recovered++; | ||
| auto manager = pg.obc_loader.get_obc_manager( | ||
| recovery_waiter.obc); | ||
| manager.lock_excl_sync(); /* cannot already be locked */ |
There was a problem hiding this comment.
This obc cannot already be locked since we've just recovered it?
There was a problem hiding this comment.
Yeah, we just recovered it so it can't be locked.
| seastar::make_ready_future<>()); | ||
| if (pull_info.recovery_progress.first) { | ||
| prepare_waiter = pg.obc_loader.with_obc<RWState::RWNONE>( | ||
| auto fut = pg.obc_loader.with_obc<RWState::RWNONE>( |
There was a problem hiding this comment.
Should we move this bit to the manager as well? (creation of the WaitForObjectRecovery::obc that will be the one taking excl lock later on)
auto obc_orderer = pg.obc_loader.get_obc_orderer(pull_info.recovery_info.soid);
auto obc_manager = pg.obc_loader.get_obc_manager(
obc_orderer,
pull_info.recovery_info.soid);
co_await pg.obc_loader.load_and_lock(
obc_manager, RWState::RWNONE
).handle_error_interruptible(
crimson::ct_error::assert_all("unexpected error")
);
// TODO: move to ObjectContextLoader once constructing obc from attrset is supported
obc_manager.get_obc()->obs.oi.decode_no_oid(push_op.attrset.at(OI_ATTR),
....
There was a problem hiding this comment.
No lock has to be taken here since we are not submitting the transaction yet and its the phase where we only create this obc?
There was a problem hiding this comment.
Good call, but it can be a future PR
|
@athanatos, since this was tested I'm ok with merging as is and follow up on some of the comments later on. |
Let ReplicatedRecoveryBackend::handle_recovery_op route pushes between handle_push and handle_pull_response instead of ReplicatedRecoveryBackend::handle_push. Signed-off-by: Samuel Just <sjust@redhat.com>
…commit Fixes: https://tracker.ceph.com/issues/69412 Signed-off-by: Samuel Just <sjust@redhat.com>
4e70fbb to
6093f91
Compare
|
jenkins test make check |
See https://tracker.ceph.com/issues/69412
Follow up PR will address replica side.
Test run looks good, failures listed below:
https://pulpito.ceph.com/sjust-2025-01-28_06:26:29-crimson-rados-wip-sjust-crimson-testing-2025-01-27-distro-default-smithi/
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e