-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
squid: crimson/osd/replicated_recovery_backend: Fix recovery obc usage #57514
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously, only the head obc had ssc reference. Let clone obc also reference it's head ssc. Fixes: https://tracker.ceph.com/issues/65203 Fixes: https://tracker.ceph.com/issues/65201 Signed-off-by: Matan Breizman <mbreizma@redhat.com> (cherry picked from commit 5de3da0)
…case Resolve_oid on a clone object may actually return the head: ``` // Because oid.snap > ss.seq, we are trying to read from a snapshot // taken after the most recent write to this object. Read from head. ``` In this case, with_clone_obc should apply `func` same as with_head_obc would have. Note: previously, with_clone_obc_only was called on the resolved head object. While it didn't cause any errors, using the head_obc as clone is wrong. Signed-off-by: Matan Breizman <mbreizma@redhat.com> (cherry picked from commit d8aad55)
Signed-off-by: Matan Breizman <mbreizma@redhat.com> (cherry picked from commit 7e208d9)
ObjectContextLoader interface provides two variants: * with_obc: // Use this variant by default // If oid is a clone object, the clone obc *and* it's // matching head obc will be locked and can be used in func. * with_clone_obc_only: // Use this variant in the case where the head object // obc is already locked and only the clone obc is needed. // Avoid nesting with_head_obc() calls by using with_clone_obc() // with an already locked head. with_clone_obc_direct variant is equal to with_obc on a clone obc since both the head and the clone obcs will be locked and can be used. Signed-off-by: Matan Breizman <mbreizma@redhat.com> (cherry picked from commit 9a27c95)
No change in behavior Signed-off-by: Matan Breizman <mbreizma@redhat.com> (cherry picked from commit 47af391)
No change in behavior, improved readability Signed-off-by: Matan Breizman <mbreizma@redhat.com> (cherry picked from commit 09537e1)
SnapTrimObjSubEvent::remove_or_update partially resolves the to be trimmed clone taking into account in_removed_snaps_queue. The general resolve_oid is not suitable for this scenario. Specifically the following check: ``` if (std::find( citer->second.begin(), citer->second.end(), oid.snap) == citer->second.end()) { logger().debug("{} {} does not contain {} -- DNE", __func__, ss.clone_snaps, oid.snap); return std::nullopt; } ``` because of earlier snap_map_modify call. Example: ``` INFO 2024-04-07 13:44:01,118 [shard 0:main] osd - SnapTrimObjSubEvent(coid=2:e8855410:::folio011816418-576:8 snapid=8): 2:e8855410:::folio011816418-576:8 snaps [8, 7] -> {7} DEBUG 2024-04-07 13:44:01,118 [shard 0:main] osd - snap_map_modify: soid 2:e8855410:::folio011816418-576:8, snaps {7} ... This case will fail: INFO 2024-04-07 13:44:04,139 [shard 0:main] osd - SnapTrimObjSubEvent(coid=2:e8855410:::folio011816418-576:8 snapid=7): 2:e8855410:::folio011816418-576:8 snaps [7] -> {} ... deleting DEBUG 2024-04-07 13:44:04,139 [shard 0:main] osd - snap_map_remove: soid 2:e8855410:::folio011816418-576:8 ``` Signed-off-by: Matan Breizman <mbreizma@redhat.com> (cherry picked from commit 263b2ae)
Signed-off-by: Matan Breizman <mbreizma@redhat.com> (cherry picked from commit 48be64b)
athanatos
approved these changes
May 20, 2024
jenkins test api |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
backport of #56610
this backport was staged using crimson-backport.sh which is based on ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh