Skip to content

Commit 047e8a0

Browse files
committed
Don't use tsdb codec for recovery_source fields
1 parent de98e5d commit 047e8a0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -531,12 +531,6 @@ tests:
531531
- class: org.elasticsearch.xpack.ml.integration.InferenceIT
532532
method: testInferClassificationModel
533533
issue: https://github.com/elastic/elasticsearch/issues/133448
534-
- class: org.elasticsearch.xpack.logsdb.LogsIndexingIT
535-
method: testRouteOnSortFields
536-
issue: https://github.com/elastic/elasticsearch/issues/133993
537-
- class: org.elasticsearch.xpack.logsdb.LogsIndexingIT
538-
method: testShrink
539-
issue: https://github.com/elastic/elasticsearch/issues/133875
540534
- class: org.elasticsearch.xpack.esql.action.CrossClusterQueryWithPartialResultsIT
541535
method: testPartialResults
542536
issue: https://github.com/elastic/elasticsearch/issues/131481

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.elasticsearch.index.mapper.Mapper;
2828
import org.elasticsearch.index.mapper.MapperService;
2929
import org.elasticsearch.index.mapper.SeqNoFieldMapper;
30+
import org.elasticsearch.index.mapper.SourceFieldMapper;
3031
import org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapper;
3132

3233
/**
@@ -127,6 +128,11 @@ boolean useTSDBDocValuesFormat(final String field) {
127128

128129
private boolean excludeFields(String fieldName) {
129130
// TODO: should we just allow all fields to use tsdb doc values codec?
131+
// Values of these doc_values fields can be filtered out in RecoverySourcePruneMergePolicy,
132+
// which leads to inconsistencies between merge stats and actual values.
133+
if (SourceFieldMapper.RECOVERY_SOURCE_SIZE_NAME.equals(fieldName) || SourceFieldMapper.RECOVERY_SOURCE_NAME.equals(fieldName)) {
134+
return true;
135+
}
130136
// Avoid using tsdb codec for fields like _seq_no, _primary_term.
131137
// But _tsid and _ts_routing_hash should always use the tsdb codec.
132138
return fieldName.startsWith("_")

0 commit comments

Comments
 (0)