Skip to content

Mapping bwc serialization assertion failure #138796

@martijnvg

Description

@martijnvg

The store mapping attribute default logic seems be causing assertion errors:

[2025-11-29T03:42:23,880][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [test-cluster-2] fatal error in thread [elasticsearch[test-cluster-2][clusterApplierService#updateTask][T#1]], exiting
java.lang.AssertionError: provided source [{"_doc":{"properties":{"card":{"type":"text","store":true}}}}] differs from mapping [{"_doc":{"properties":{"card":{"type":"text"}}}}]
	at org.elasticsearch.index.mapper.DocumentMapper.<init>(DocumentMapper.java:72) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.index.mapper.MapperService.newDocumentMapper(MapperService.java:609) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.index.mapper.MapperService.updateMapping(MapperService.java:361) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.index.IndexService.updateMapping(IndexService.java:885) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.indices.cluster.IndicesClusterStateService.createIndicesAndUpdateShards(IndicesClusterStateService.java:644) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.indices.cluster.IndicesClusterStateService.doApplyClusterState(IndicesClusterStateService.java:359) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyClusterState(IndicesClusterStateService.java:304) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:572) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:558) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:531) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:460) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:159) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:1021) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:218) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:184) ~[elasticsearch-9.2.2-SNAPSHOT.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614) ~[?:?]
	at java.lang.Thread.run(Thread.java:1474) ~[?:?]

Seen in bwc CI failures like: https://gradle-enterprise.elastic.co/s/pobn2swpaipee
Likely cause: #138523

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions