Repository navigation
mds: account for snapshot items when deciding to split or merge a directory - #48907
Merged
Merged
Conversation
vshankar
force-pushed
the
wip-cdir-merge-snap-items
branch
2 times, most recently
from
November 16, 2022 10:54
049b058 to
6e43ae6
Compare
mchangir
reviewed
Nov 19, 2022
kotreshhr
approved these changes
Nov 21, 2022
vshankar
commented
Dec 22, 2022
…ectory
Its easy to "overload" a directory object with large number of omap entries by
doing the following (one shot or over and over again):
- touch dir/file{0..11000} ; create 11000 files (> mds_bal_split_size)
- mkdir dir/.snap/snap_a
- rm -f dir/file{0..11000}
End result - the directory object would have 11000 omap entries since the MDS
does not fragment directory snapshots. If the number of such entries exceed
`osd_deep_scrub_large_omap_object_key_threshold` (default: 200000), a cluster
health warning is generated:
Large Omap objects found in pool...
CDir::should_merge() does not take into account COW'd inodes and the frags
get merged.
Fixes: http://tracker.ceph.com/issues/55215
Signed-off-by: Venky Shankar <[email protected]>
…/merge a directory Signed-off-by: Venky Shankar <[email protected]>
vshankar
force-pushed
the
wip-cdir-merge-snap-items
branch
from
December 22, 2022 14:32
6e43ae6 to
7547990
Compare
Contributor
Author
|
(commit message update with tracker ticket) |
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.
Its easy to "overload" a directory object with large number of omap entries by
doing the following (one shot or over and over again):
End result - the directory object would have 11000 omap entries since the MDS
does not fragment directory snapshots. If the number of such entries exceed
osd_deep_scrub_large_omap_object_key_threshold(default: 200000), a clusterhealth warning is generated:
--
So, this change might crash and burn the MDS. We'll have to test it and see what breaks. The number of snap/null items in a directory fragment is not used extensively in CDir source (except for deciding some fast path while splitting).
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