Skip to content

[8.18] [Reporting] roll over the reporting data stream when the template has changed (#234119)#237118

Closed
pmuellr wants to merge 2 commits intoelastic:8.18from
pmuellr:backport/8.18/pr-234119
Closed

[8.18] [Reporting] roll over the reporting data stream when the template has changed (#234119)#237118
pmuellr wants to merge 2 commits intoelastic:8.18from
pmuellr:backport/8.18/pr-234119

Conversation

@pmuellr
Copy link
Contributor

@pmuellr pmuellr commented Oct 1, 2025

Backport

This will backport the following commits from main to 8.18:

Questions ?

Please refer to the Backport tool documentation

… changed (elastic#234119)

resolves: elastic#231200

This PR adds code run at startup to check the version in the reporting
index template against the `_meta.template_version` value stamped into
each backing index's mappings via
elastic/elasticsearch#133846

If it determines there are existing reporting indices that have not been
created with the current index template version, it will roll over the
reporting data stream, to ensure future indexing will use the latest
mappings. This is done with the "lazy" option, which will perform the
roll over on the next write to the datastream. This will prevent
situations where multiple Kibanas restarting at the same time would roll
over multiple times.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit c89ba82)

# Conflicts:
#	.github/CODEOWNERS
#	x-pack/test/reporting_api_integration/reporting_without_security.config.ts
#	x-pack/test/reporting_api_integration/reporting_without_security/index.ts
#	x-pack/test/reporting_api_integration/reporting_without_security/roll_datastream.ts
#	x-pack/test/tsconfig.json
@pmuellr pmuellr requested a review from kibanamachine as a code owner October 1, 2025 12:49
@pmuellr pmuellr added the backport This PR is a backport of another PR label Oct 1, 2025
@pmuellr pmuellr enabled auto-merge (squash) October 1, 2025 12:49
@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 1, 2025

💔 Build Failed

Failed CI Steps

History

@pmuellr
Copy link
Contributor Author

pmuellr commented Oct 1, 2025

closing, since not needed: #234119 (comment)

@pmuellr pmuellr closed this Oct 1, 2025
auto-merge was automatically disabled October 1, 2025 20:02

Pull request was closed

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

Labels

backport This PR is a backport of another PR

3 participants