Skip to content

Conversation

@nielsbauman
Copy link
Contributor

The main goal of the PR is to fix the "rollover failed" log in the IndexTemplateRegistry. We were logging this on every upgrade because rolloverResponse.isRolledOver() is always false when we do a lazy rollover request - which is the default for index template updates.

While I was looking at this, I noticed we don't actually return early when we process a lazy rollover dry run. The end result happened to be ok (i.e. side-effects and response), but I figured I might as well fix the behavior to return early.

Finally, we add an INFO log in the lazy rollover action to aid the debugging process.

The main goal of the PR is to fix the "rollover failed" log in the
`IndexTemplateRegistry`. We were logging this on every upgrade because
`rolloverResponse.isRolledOver()` is always `false` when we do a lazy
rollover request - which is the default for index template updates.

While I was looking at this, I noticed we don't actually return early
when we process a lazy rollover _dry run_. The end result happened to be
ok (i.e. side-effects and response), but I figured I might as well fix
the behavior to return early.

Finally, we add an `INFO` log in the lazy rollover action to aid the
debugging process.
@nielsbauman nielsbauman added >non-issue :Data Management/Indices APIs APIs to create and manage indices and templates Team:Data Management Meta label for data/management team auto-backport Automatically create backport pull requests when merged v8.18.1 v8.19.0 v9.0.1 v9.1.0 labels Mar 5, 2025
@nielsbauman nielsbauman requested a review from gmarouli March 5, 2025 21:56
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Copy link
Contributor

@gmarouli gmarouli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Thank you for fixing it, I left some minor comments but LGTM.

@nielsbauman nielsbauman requested a review from gmarouli March 7, 2025 08:54
Copy link
Contributor

@gmarouli gmarouli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀 ship it :)

@nielsbauman nielsbauman merged commit 9544204 into elastic:main Mar 7, 2025
17 checks passed
@nielsbauman nielsbauman deleted the lazy-rollover-fixes branch March 7, 2025 11:01
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.18 Commit could not be cherrypicked due to conflicts
8.x Commit could not be cherrypicked due to conflicts
9.0 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 124153

nielsbauman added a commit to nielsbauman/elasticsearch that referenced this pull request Mar 7, 2025
The main goal of the PR is to fix the "rollover failed" log in the
`IndexTemplateRegistry`. We were logging this on every upgrade because
`rolloverResponse.isRolledOver()` is always `false` when we do a lazy
rollover request - which is the default for index template updates.

While I was looking at this, I noticed we don't actually return early
when we process a lazy rollover _dry run_. The end result happened to be
ok (i.e. side-effects and response), but I figured I might as well fix
the behavior to return early.

Finally, we add an `INFO` log in the lazy rollover action to aid the
debugging process.

(cherry picked from commit 9544204)

# Conflicts:
#	server/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java
@nielsbauman
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x
9.0
8.18

Questions ?

Please refer to the Backport tool documentation

nielsbauman added a commit to nielsbauman/elasticsearch that referenced this pull request Mar 7, 2025
The main goal of the PR is to fix the "rollover failed" log in the
`IndexTemplateRegistry`. We were logging this on every upgrade because
`rolloverResponse.isRolledOver()` is always `false` when we do a lazy
rollover request - which is the default for index template updates.

While I was looking at this, I noticed we don't actually return early
when we process a lazy rollover _dry run_. The end result happened to be
ok (i.e. side-effects and response), but I figured I might as well fix
the behavior to return early.

Finally, we add an `INFO` log in the lazy rollover action to aid the
debugging process.

(cherry picked from commit 9544204)

# Conflicts:
#	server/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java
elasticsearchmachine pushed a commit that referenced this pull request Mar 7, 2025
The main goal of the PR is to fix the "rollover failed" log in the
`IndexTemplateRegistry`. We were logging this on every upgrade because
`rolloverResponse.isRolledOver()` is always `false` when we do a lazy
rollover request - which is the default for index template updates.

While I was looking at this, I noticed we don't actually return early
when we process a lazy rollover _dry run_. The end result happened to be
ok (i.e. side-effects and response), but I figured I might as well fix
the behavior to return early.

Finally, we add an `INFO` log in the lazy rollover action to aid the
debugging process.

(cherry picked from commit 9544204)

# Conflicts:
#	server/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java
elasticsearchmachine pushed a commit that referenced this pull request Mar 7, 2025
The main goal of the PR is to fix the "rollover failed" log in the
`IndexTemplateRegistry`. We were logging this on every upgrade because
`rolloverResponse.isRolledOver()` is always `false` when we do a lazy
rollover request - which is the default for index template updates.

While I was looking at this, I noticed we don't actually return early
when we process a lazy rollover _dry run_. The end result happened to be
ok (i.e. side-effects and response), but I figured I might as well fix
the behavior to return early.

Finally, we add an `INFO` log in the lazy rollover action to aid the
debugging process.

(cherry picked from commit 9544204)

# Conflicts:
#	server/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java
elasticsearchmachine pushed a commit that referenced this pull request Mar 7, 2025
The main goal of the PR is to fix the "rollover failed" log in the
`IndexTemplateRegistry`. We were logging this on every upgrade because
`rolloverResponse.isRolledOver()` is always `false` when we do a lazy
rollover request - which is the default for index template updates.

While I was looking at this, I noticed we don't actually return early
when we process a lazy rollover _dry run_. The end result happened to be
ok (i.e. side-effects and response), but I figured I might as well fix
the behavior to return early.

Finally, we add an `INFO` log in the lazy rollover action to aid the
debugging process.

(cherry picked from commit 9544204)

# Conflicts:
#	server/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java
georgewallace pushed a commit to georgewallace/elasticsearch that referenced this pull request Mar 11, 2025
The main goal of the PR is to fix the "rollover failed" log in the
`IndexTemplateRegistry`. We were logging this on every upgrade because
`rolloverResponse.isRolledOver()` is always `false` when we do a lazy
rollover request - which is the default for index template updates.

While I was looking at this, I noticed we don't actually return early
when we process a lazy rollover _dry run_. The end result happened to be
ok (i.e. side-effects and response), but I figured I might as well fix
the behavior to return early.

Finally, we add an `INFO` log in the lazy rollover action to aid the
debugging process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Data Management/Indices APIs APIs to create and manage indices and templates >non-issue Team:Data Management Meta label for data/management team v8.18.1 v8.19.0 v9.0.1 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants