Repository navigation
osdc: fix ReplicaSplitOp read - #70207
Conversation
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
16 similar comments
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
ok to test |
|
@aainscow hi Alex, could you take a look? these fix looks correct to me, but since f0115fa is included by umbrella. and a backport would need a tracker ticket. Before I prepare one: is replica split read meant to be production ready in v21? The pool flag auto-enables at |
Replica Split Ops are disabled by default, although we had only seen performance issues with them on busy systems. The nature of this bug suggests that our testing has not been good enough and we need to improve that before accepting this. |
|
Please note that we are taking this seriously and are still investigating why this was not detected by our teuthology testing. Before I accept the fix, I want to make sure that we have recreated the issues in teuthology, so we have more confidence in our testing going forward. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
6817f58 to
41a8751
Compare
|
jenkins test signed |
|
jenkins test submodules |
|
This PR has been added to wip-bharath22-testing-20260917.055008-main. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
ReplicaSplitOp::init_read() distributed chunks over a window of acting indices starting at the random reference_sub_read and wrapping at the OSD count. This broke reads in two ways: - assemble_buffer_read() concatenates sub-read buffers in ascending acting-index order, but chunks were assigned in window order, so a wrapped window was reassembled in the wrong order. - chunk_size rounded the division down, which can produce one more chunk than slice_count. The extra chunk wrapped the window fully around and attached a second read sharing one output buffer to the first sub-read. Round the division up, and distribute the chunks over an explicit window of valid acting indices assigned in ascending order. init_reference_sub_read() now collects those indices and picks one of them, matching ECSplitOp. Signed-off-by: Sun Yuechi <[email protected]>
Splitting validation only requires one op in a request to reach the minimum split size, so a multi-op request may carry a shorter read. ReplicaSplitOp::init_read() crashed on a division by zero for such an op; clamp slice_count to one, serving it whole from the reference OSD. The op then holds details on the reference sub-read only, but assemble_buffer_read() and assemble_buffer_sparse_read() called details.at(ops_index) on every sub-read; mini_flat_map::at() throws std::out_of_range for a missing key, and complete() runs from the destructor, so such a request terminated the client. Skip sub-reads that did not take part in the op. Signed-off-by: Sun Yuechi <[email protected]>
Add replica split-op regression tests using patterned data; the existing tests write zeros, which cannot detect misordered reassembly. The new cases cover a wrapped chunk window, an unaligned length producing more chunks than slices, and a read below the minimum split size in a multi-op request. Signed-off-by: Sun Yuechi <[email protected]>
create() clears BALANCE_READS and pins pgid before it knows whether the split goes ahead, and _calc_target() short-circuits once pgid is set. A request that aborts after that point is sent to the primary with the balanced-read flag lost. Restore the target on every path that gives up on the split. Signed-off-by: Sun Yuechi <[email protected]>
41a8751 to
7795f93
Compare
|
Resolved conflicts, dropped the replicated-pool early return in prepare_single_op() and the SingleChunkAfterPageRoundup test. |
|
This PR has been added to wip-bharath3-testing-20260918.154843-main. |
|
This PR has been removed from wip-bharath22-testing-20260917.055008-main. |
|
jenkins test make check |
|
@aainscow hi Alex, i just merged this PR, but he associated tracker ticket is not assigned. and its "Backport" field is empty. is this expected? i just changed its status to "Pending Backport", as i assumed that we plan to backport this fix. but seems it's not quite ready to be picked up by the bot or the script. |
It was on our radar, but I had not correctly filled in the backport of the tracker - fixed now. |
The new snapshot brings in these fixes: - osd/PeeringState: fix the divergence check against olog.head (ceph/ceph#70149) - osd: assert OI_ATTR is present in rollback_setattrs (ceph/ceph#70965) - osdc: fix ReplicaSplitOp chunk distribution, reassembly and small multi-op reads (ceph/ceph#70207) - erasure-code/isa: default the technique when the profile has none (ceph/ceph#72215) - mount.ceph: report kernels without aes256k key support (ceph/ceph#72159) - rgw/es: require both major and minor in the ES version (ceph/ceph#70007) - build: turn WITH_RADOSGW_LANCEDB off where lance cannot build (ceph/ceph#71935) - cmake: make SIMD_COMPILE_FLAGS a list (ceph/ceph#72657) - cmake/boost: do not pass context-impl to the headers step (ceph/ceph#71249) - rpm: let ceph-mgr-cephadm require routes (ceph/ceph#73051) - test/mds: widen result waits in ReleaseAwait (ceph/ceph#70463) - qa/lsan.supp: match OpenSSL error state on ERR_set_mark (ceph/ceph#71460) Signed-off-by: Sun Yuechi <[email protected]>
The new snapshot brings in these fixes: - osd/PeeringState: fix the divergence check against olog.head (ceph/ceph#70149) - osd: assert OI_ATTR is present in rollback_setattrs (ceph/ceph#70965) - osdc: fix ReplicaSplitOp chunk distribution, reassembly and small multi-op reads (ceph/ceph#70207) - erasure-code/isa: default the technique when the profile has none (ceph/ceph#72215) - mount.ceph: report kernels without aes256k key support (ceph/ceph#72159) - rgw/es: require both major and minor in the ES version (ceph/ceph#70007) - build: turn WITH_RADOSGW_LANCEDB off where lance cannot build (ceph/ceph#71935) - cmake: make SIMD_COMPILE_FLAGS a list (ceph/ceph#72657) - cmake/boost: do not pass context-impl to the headers step (ceph/ceph#71249) - rpm: let ceph-mgr-cephadm require routes (ceph/ceph#73051) - test/mds: widen result waits in ReleaseAwait (ceph/ceph#70463) - qa/lsan.supp: match OpenSSL error state on ERR_set_mark (ceph/ceph#71460) Signed-off-by: Sun Yuechi <[email protected]>
ReplicaSplitOp splits a large replicated-pool read across replicas.
Chunks were distributed starting from a random replica yet reassembled in
ascending acting-index order, so a wrapped window returned its chunks out of
order; a rounded-down chunk size could also emit an extra chunk that reused
another sub-read's buffer. Both silently corrupt the read. Separately, a
multi-op request may carry a read below the minimum split size, since only
one op in the request has to reach it; such an op divided by zero and then
threw std::out_of_range from a destructor, terminating the client.
These bugs are in the SplitOp (default off).
Tests are added with patterned data, since the existing all-zero tests
cannot detect misordered reassembly.
Tracker: https://tracker.ceph.com/issues/78329
Checklist