File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
server/src/main/java/org/elasticsearch/index/codec Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments