Skip to content

Commit 8c61ace

Browse files
committed
iter comments
1 parent 1ac98d9 commit 8c61ace

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

server/src/main/java/org/elasticsearch/index/codec/TrackingPostingsInMemoryBytesCodec.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ static final class TrackingLengthFieldsConsumer extends FieldsConsumer {
7070
this.state = state;
7171
this.in = in;
7272
this.totalBytes = new long[1];
73-
// Alternatively, we can consider using a FixedBitSet here and size to max(fieldNumber). T
74-
// his should be faster without worrying too much about memory usage.
73+
// Alternatively, we can consider using a FixedBitSet here and size to max(fieldNumber).
74+
// This should be faster without worrying too much about memory usage.
7575
this.seenFields = new IntHashSet(state.fieldInfos.size());
7676
}
7777

@@ -110,7 +110,8 @@ public Terms terms(String field) throws IOException {
110110
return new TrackingLengthTerms(terms, bytes -> totalBytes[0] += bytes);
111111
} else {
112112
// As far as I know only when bloom filter for _id filter gets written this method gets invoked twice for the same field.
113-
// So maybe we can get rid of the seenFields here? And just keep track of whether _id field has been seen?
113+
// So maybe we can get rid of the seenFields here? And just keep track of whether _id field has been seen? However, this
114+
// is fragile and could make us vulnerable to tricky bugs in the future if this is no longer the case.
114115
return terms;
115116
}
116117
}

0 commit comments

Comments
 (0)