crimson/osd: Support balance reads#49116
Conversation
|
Does ceph_test_rados have a way of sending balanced reads? We should probably enable it in the crimson tests if so. |
f609187 to
acbd881
Compare
67fdba6 to
08891c7
Compare
08891c7 to
04fc955
Compare
04fc955 to
4abd88b
Compare
|
jenkins test make check |
| !pg->is_degraded_or_backfilling_object(soid)) { | ||
| if (pg->is_unreadable_object(soid, &ver)){ | ||
| logger().error("{} {} is unreadable", __func__, soid); | ||
| //TODO:: wait for unreadable |
There was a problem hiding this comment.
Why are we leaving a TODO here?
There was a problem hiding this comment.
The intent here was to separate the wait_for_unreadable_object() and wait_for_degraded_object() cases, same as classic does (using<hobject_t, std::list<OpRequestRef>> maps).
In crimson there isn't any differentiation between those, we simply "wait for recovery" in both cases.
In second thought, I will leave the current implementation as is and drop this commit since it's out of the scope of this PR.
| pp().recover_missing | ||
| ).then_interruptible([this] { | ||
| return do_recover_missing(pg, get_target_oid()); | ||
| if (pg->is_primary()) { |
There was a problem hiding this comment.
I don't think it's possible to have an internal_client_request on a replica -- confirm that, add an assert to the start of the op, and add it to the comment at the top of the class.
src/crimson/osd/pg.cc
Outdated
| //if (is_primary() && last != logv.rend()) { | ||
| //projected_log.skip_can_rollback_to_to_head(); | ||
| //projected_log.trim(cct, last->version, nullptr, nullptr, nullptr); | ||
| //} |
There was a problem hiding this comment.
No projected_log concept in Crimson's pg yet. It might be easier to track down the missing pieces when grepping these comments while implementing (in similarity to BackfillState::Enqueuing::maybe_update_range()).
There was a problem hiding this comment.
Moved into a #if 0 block
4abd88b to
9653504
Compare
|
@rzarzynski, re-based with latest main (w/ merged SnapTrim PR). |
3d2bdc0 to
2104695
Compare
athanatos
left a comment
There was a problem hiding this comment.
LGTM other than the nits
…on replica * assert internal_client_request is on primary since do_recover_missing is also called by internal requests. Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
In the case of balanced read the op is not misdirected. Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2104695 to
8803508
Compare
* Move error checking to the beginning of do_process() Signed-off-by: Matan Breizman <mbreizma@redhat.com>
…ed/localized Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Clear invalid obc from cache. Fixes: https://tracker.ceph.com/issues/58089 Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Wait on a PG to advance to the request's map epoch. Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
8803508 to
93c719b
Compare
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
discard op in the case where same_primary_since is later than the MOSDOp's map epoch Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Before this patch, ObjectContext had a head member which was used to get the head obc of a clone object. This member caused the head object to being referenced while attempting to 'clear_replica_obc' (Since we only evict un-referenced obc from the obc_registery). This mechanism, of obtaining the head, is no longer needed since 'with_clone_obc' loads the head object context first (using oid.get_head). In this commit, head is removed from ObjectContext class and users are removed as well. Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
In continuation to 7ca2690: Now that the head ref is no longer a member of obc, we need a new substitute way to get the head when needed. When loading a clone object, the head object is loaded first (See with_clone_obc). Therefore we can make use of this design to move the loaded head forward to the relevant func (See with_head_and_clone_obc). Usually, we wouldn't need to make use of both the head and the clone obc in the same function. However, SnapTrimObjSubEvent::remove_or_update is an abnormal usage. Note: We want to avoid holding any unneeded references to obcs to allow the obc_registery to evict no longer valid obc. Therefore, with_obc() which references only a single obc is the preferred entry point for loading obcs. Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
93c719b to
b1632db
Compare
|
jenkins test api |
Fix
TestLibRBD.TestIOfailure with multiple OSDs by supporting balance reads.do_recover_missing()on replicas.PG::replica_clear_repop_obc()- Reload or remove invalid objects contexts from the registry.thrash/workloads/small-objects-balanced/localizedtests.RepRequest.on_change()to erase watchers before changing state from primary to replica.headmember from ObjectContextFixes: https://tracker.ceph.com/issues/58089
TODO:Blocked-by:
Test:
OSD=3 cluster (Test conf is set to
rbd_read_from_replica_policy:balance) :Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
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 windows