You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2021/09/22 05:44:35 UTC
[lucene] branch main updated: LUCENE-10111: Missing calculating the
bytes used of DocsWithFieldSet in NormValuesWriter (#307)
This is an automated email from the ASF dual-hosted git repository.
jpountz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new a7bddfa LUCENE-10111: Missing calculating the bytes used of DocsWithFieldSet in NormValuesWriter (#307)
a7bddfa is described below
commit a7bddfaacc24aae1d9bb97c8c4e87533d85ae42c
Author: Lu Xugang <q1...@Gmail.com>
AuthorDate: Wed Sep 22 13:44:30 2021 +0800
LUCENE-10111: Missing calculating the bytes used of DocsWithFieldSet in NormValuesWriter (#307)
---
lucene/CHANGES.txt | 3 +++
lucene/core/src/java/org/apache/lucene/index/NormValuesWriter.java | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index d7a8d59..cc8e21d 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -420,6 +420,9 @@ Bug Fixes
* LUCENE-10110: MultiCollector now handles single leaf collector that wants to skip low-scoring hits
but the combined score mode doesn't allow it. (Jim Ferenczi)
+* LUCENE-10111: Missing calculating the bytes used of DocsWithFieldSet in NormValuesWriter.
+ (Lu Xugang)
+
Build
---------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/NormValuesWriter.java b/lucene/core/src/java/org/apache/lucene/index/NormValuesWriter.java
index 202db7e..8fe7376 100644
--- a/lucene/core/src/java/org/apache/lucene/index/NormValuesWriter.java
+++ b/lucene/core/src/java/org/apache/lucene/index/NormValuesWriter.java
@@ -60,7 +60,7 @@ class NormValuesWriter {
}
private void updateBytesUsed() {
- final long newBytesUsed = pending.ramBytesUsed();
+ final long newBytesUsed = pending.ramBytesUsed() + docsWithField.ramBytesUsed();
iwBytesUsed.addAndGet(newBytesUsed - bytesUsed);
bytesUsed = newBytesUsed;
}