mirror of https://github.com/apache/lucene.git
LUCENE-9322: Add Vectors format to CodecReader accounting methods (#2353)
This commit is contained in:
parent
019872453d
commit
683a9bd78a
|
@ -259,6 +259,11 @@ public abstract class CodecReader extends LeafReader implements Accountable {
|
|||
ramBytesUsed += getPointsReader().ramBytesUsed();
|
||||
}
|
||||
|
||||
// vectors
|
||||
if (getVectorReader() != null) {
|
||||
ramBytesUsed += getVectorReader().ramBytesUsed();
|
||||
}
|
||||
|
||||
return ramBytesUsed;
|
||||
}
|
||||
|
||||
|
@ -295,6 +300,11 @@ public abstract class CodecReader extends LeafReader implements Accountable {
|
|||
resources.add(Accountables.namedAccountable("points", getPointsReader()));
|
||||
}
|
||||
|
||||
// vectors
|
||||
if (getVectorReader() != null) {
|
||||
resources.add(Accountables.namedAccountable("vectors", getVectorReader()));
|
||||
}
|
||||
|
||||
return Collections.unmodifiableList(resources);
|
||||
}
|
||||
|
||||
|
@ -329,5 +339,10 @@ public abstract class CodecReader extends LeafReader implements Accountable {
|
|||
if (getPointsReader() != null) {
|
||||
getPointsReader().checkIntegrity();
|
||||
}
|
||||
|
||||
// vectors
|
||||
if (getVectorReader() != null) {
|
||||
getVectorReader().checkIntegrity();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue