-
Notifications
You must be signed in to change notification settings - Fork 997
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
support parallel directory summary #3340
Conversation
Signed-off-by: xixi <[email protected]>
Signed-off-by: xixi <[email protected]>
Signed-off-by: xixi <[email protected]>
Signed-off-by: xixi <[email protected]>
pkg/meta/utils.go
Outdated
summary.Dirs++ | ||
if recursive { | ||
if st := fastGetSummary(r, ctx, e.Inode, summary, recursive); st != 0 { | ||
const concurrency = 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's too high, may DOS the database, 20-50 should be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #3340 +/- ##
==========================================
+ Coverage 55.13% 55.20% +0.06%
==========================================
Files 142 142
Lines 34256 34286 +30
==========================================
+ Hits 18888 18926 +38
+ Misses 13369 13363 -6
+ Partials 1999 1997 -2
... and 8 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Signed-off-by: xixi <[email protected]>
Both of strict summary and fast summary should run
readdir
parallelly.Performance improvement
In engines that support high concurrency, such as TiKV, the parallel summary feature has become 20 times faster than before.