luyuncheng opened a new pull request, #12273:
URL: https://github.com/apache/lucene/pull/12273
We have many docValues field update scenarios especially enabled
**softDeletes**. so we re check the logic in `ReadersAndUpdates`. i think the
following sort logic is unnecessary
```
Collections.sort(updates, Comparator.comparingLong(a -> a.delGen));
```
because sort need `O(n lg(n))` iterator, ant then scan
List<DocValuesFieldUpdates>. we can save this operation.
`pendingDVUpdates` all uses in
https://github.com/apache/lucene/blob/a39885fdab93c4cbbcab8f3112c9783a05ca15a9/lucene/core/src/java/org/apache/lucene/index/ReadersAndUpdates.java#L557-L566
AND
iterator all `List<DocValuesFieldUpdates>` to Prune the now-written DV
updates:
https://github.com/apache/lucene/blob/a39885fdab93c4cbbcab8f3112c9783a05ca15a9/lucene/core/src/java/org/apache/lucene/index/ReadersAndUpdates.java#L658-L666
it is unnecessary to sort with increasing delGen.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]