-
-
Notifications
You must be signed in to change notification settings - Fork 713
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
Remove unused sort for segmenta meta list #1218
Conversation
d3ccfff
to
f54d88a
Compare
Codecov Report
@@ Coverage Diff @@
## main #1218 +/- ##
==========================================
+ Coverage 94.05% 94.09% +0.03%
==========================================
Files 205 205
Lines 34514 34517 +3
==========================================
+ Hits 32463 32478 +15
+ Misses 2051 2039 -12
Continue to review full report at Codecov.
|
LGTM Thank you @k-yomo. The explanation were very helpful too. I am waiting for the CI and will merge after. |
Head branch was pushed to by a user without write access
* Remove unused sort for segment meta list * Fix segment meta order dependent test
https://github.com/quickwit-inc/tantivy/blob/02174d26af50af2cf8b9f7592c35e90aae14de70/src/indexer/segment_updater.rs#L415-L423
The
segment_metas
method is only used in the above method, but it's re-sorted by doc count in the method as following. So the original sort by segment id can be removed to make it little more efficient.https://github.com/quickwit-inc/tantivy/blob/02174d26af50af2cf8b9f7592c35e90aae14de70/src/indexer/segment_updater.rs#L438