osd/PGLog: persist num_objects_missing for replicas when peering is done#30466
Merged
xiexingguo merged 1 commit intoceph:masterfrom Sep 27, 2019
Merged
osd/PGLog: persist num_objects_missing for replicas when peering is done#30466xiexingguo merged 1 commit intoceph:masterfrom
xiexingguo merged 1 commit intoceph:masterfrom
Conversation
guoracle reported that: > In the asynchronous recovery feature, the asynchronous recovery > target OSD is selected by last_updata.version, so that after the > peering is completed, the asynchronous recovery target OSDs update > the last_update.version, and then go down again, when the asynchronous > recovery target OSDs is back online, when peering,there is no pglog > difference between the asynchronous recovery targets and the > authoritative OSD, resulting in no asynchronous recovery. ceph#24004 aimed to solve the problem by persisting the number of missing objects into the disk when peering was done, and then we could take both new approximate missing objects (estimated according to last_update) and historical num_objects_missing into account when determining async_recovery_targets on any new follow-up peering cycles. However, the above comment stands only if we could keep an up-to-date num_objects_missing field for each pg instance under any circumstances, which is unfortunately not true for replicas which have completed peering but never started recovery later (7de3562 make sure we'll update num_objects_missing for primary when peering is done, and will keep num_objects_missing up-to-update when each missing object is recovered). Note that guoracle also suggests to fix the same problem by using last_complete.version to calculate the pglog difference and update the last_complete of the asynchronous recovery target OSD in the copy of peer_info to the latest after the recovery is complete, which should not work well because we might reset last_complete to 0'0 whenever we trim pglog past the minimal need-version of missing set. Fix by persisting num_objects_missing for replicas correctly when peering is done. Fixes: https://tracker.ceph.com/issues/41924 Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
ba81b98 to
3b024c5
Compare
Member
Author
|
@liewegas ping? |
neha-ojha
approved these changes
Sep 24, 2019
This file contains hidden or 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
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.
guoracle report that:
#24004 aimed to solve the problem by
persisting the number of missing objects into the disk when peering was
done, and then we could take both new approximate missing objects
(estimated according to last_update) and historical num_objects_missing
into account when determining async_recovery_targets on any new follow-up
peering circles.
However, the above comment stands only if we could keep an up-to-date
num_objects_missing field for each pg instance under any circumstances,
which is unfortunately not true for replicas which have completed peering
but never started recovery later (7de3562
make sure we'll update num_objects_missing for primary when peering is done,
and will keep num_objects_missing up-to-update when each missing object
is recovered).
Note that guoracle also suggests to fix the same problem by using
last_complete.version to calculate the pglog difference and update the
last_complete of the asynchronous recovery target OSD in the copy of peer_info
to the latest after the recovery is complete, which should not work well
because we might reset last_complete to 0'0 whenever we trim pglog past the
minimal need-version of missing set.
Fix by persisting num_objects_missing for replicas correctly when peering
is done.
Fixes: https://tracker.ceph.com/issues/41924
Signed-off-by: xie xingguo xie.xingguo@zte.com.cn
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard backendjenkins test docsjenkins render docs