-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
LUCENE-9298: Improve RAM accounting in BufferedUpdates when deleted doc IDs and terms are cleared #1389
Conversation
@s1monw sorry to bother, but can you take a look? |
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.
Change looks good to me. Would you mind adding a small test for this issue? Thanks @bringyou!
2. decrease bytesUsed when clearDeleteTerms; 3. fix the clearDeletedDocIds
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.
the test looks good. I like the change, I left one comment
lucene/core/src/java/org/apache/lucene/index/BufferedUpdates.java
Outdated
Show resolved
Hide resolved
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.
looks great I left one suggestions that we should merge in. Was my fault.
lucene/core/src/java/org/apache/lucene/index/BufferedUpdates.java
Outdated
Show resolved
Hide resolved
I ran tests and we are ready to go. Please add a changes entry like this: diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index b5bc71cb759..2daa8f3c71f 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -238,6 +238,9 @@ Improvements
* LUCENE-9171: QueryBuilder can now use BoostAttributes on input token streams to selectively
boost particular terms or synonyms in parsed queries. (Alessandro Benedetti, Alan Woodward)
+* LUCENE-9298: Improve RAM accounting in BufferedUpdates when deleted doc IDs and terms are cleared.
+ (Your Name, Simon Willnauer)
+
Optimizations
--------------------- |
@s1monw thanks for the reviews, I add the changelogs and edit issue's title |
thanks!! |
…oc IDs and terms are cleared (#1389)
the method clearDeletedDocIds in BufferedUpdates.java has a bug, it can't reset bytesUsed correctly.
this PR will fix it.