Github user shaie commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/513#discussion_r238937433
--- Diff: lucene/core/src/java/org/apache/lucene/index/BufferedUpdates.java
---
@@ -288,15 +186,24 @@ void clear() {
deleteTerms.clear();
deleteQueries.clear();
deleteDocIDs.clear();
- numericUpdates.clear();
- binaryUpdates.clear();
numTermDeletes.set(0);
- numNumericUpdates.set(0);
- numBinaryUpdates.set(0);
- bytesUsed.set(0);
+ numFieldUpdates.set(0);
+ fieldUpdates.clear();
+ bytesUsed.addAndGet(-bytesUsed.get());
--- End diff --
Unrelated to this PR, but it feels like `Counter` could expose a `reset()`
method and internally set the value to 0, instead of everyone doing this
juggling.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]