Skip to content

Cover the index run's rollover after the live index rejects a mapping update #4704

Open

Description

@reakaleek

An automated test should prove that an index run whose in-place api mapping update is rejected still lands the new mapping through the bootstrap rollover, before any document is written.

What is getting in your way

ElasticsearchMarkdownExporter.UpdateApiPropertyMapping PUTs the api mapping onto the live semantic index as a pre-bootstrap task. Since #4703 it logs a warning and continues when the live index rejects the change (a field whose type changed, or a normalizer the index's settings lack), because the orchestrator's bootstrap rolls the indices over on the mapping hash mismatch. That transition is proven only by a manual run against the dev cluster: the warning Live index ... rejected the in-place API property mapping update followed by rollover=True and the new field type on the new backing index. Nothing in tests/Elastic.Documentation.Indexing.Tests or tests-integration exercises it, and the exporter holds a concrete DistributedTransport and the IncrementalSyncOrchestrator, so a unit test cannot fake the rollover.

What would you like instead

An integration test in tests-integration (Docker Elasticsearch or the configured cluster) that creates a backing index with a conflicting api.properties mapping, runs the exporter, and asserts that the run logs the warning, creates a new backing index whose mapping carries the requested field, moves the read alias to it, and writes documents only to the new index.

Anything else

Raised by the review on #4703. The two mapping changes that hit this path in that stack were a normalizer (route_normalizer, abandoned) and api.properties.path_words changing from text to search_as_you_type.

Activity

  1. rahulsjha commented on Nov 21, 2026

    @rahulsjha

    Hi @reakaleek, I'd like to take this. I'd add a test where the live index rejects the in-place api mapping update, and check that the index run still lands the new mapping through the bootstrap rollover before any document is written. Okay to pick it up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions