Skip to content

Commit

Permalink
fix _cat/shards api replica output (#2809)
Browse files Browse the repository at this point in the history
Signed-off-by: Poojita Raj <[email protected]>
  • Loading branch information
Poojita-Raj authored Apr 8, 2022
1 parent ae214ec commit 49ac633
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2379,7 +2379,11 @@ protected SegmentInfos getLastCommittedSegmentInfos() {
@Override
protected final void writerSegmentStats(SegmentsStats stats) {
stats.addVersionMapMemoryInBytes(versionMap.ramBytesUsed());
stats.addIndexWriterMemoryInBytes(indexWriter.ramBytesUsed());
long indexWriterMemoryInBytes = 0;
if (!(engineConfig.getIndexSettings().isSegrepEnabled() && engineConfig.isReadOnly())) {
indexWriterMemoryInBytes = indexWriter.ramBytesUsed();
}
stats.addIndexWriterMemoryInBytes(indexWriterMemoryInBytes);
stats.updateMaxUnsafeAutoIdTimestamp(maxUnsafeAutoIdTimestamp.get());
}

Expand Down

0 comments on commit 49ac633

Please sign in to comment.