Skip to content

Conversation

@DaveCTurner
Copy link
Contributor

Mainly this is about removing the trappy implicit default master node
timeout in resize (shrink/split/clone) requests as per #107984, but also
we drop the unnecessary ActionType subclass and the test-only
ResizeRequestBuilder, migrating the affected tests over to a new
ResizeIndexTestUtils instead. We also fix the order of index-name
arguments and make the ResizeType a mandatory parameter rather than
(trappily) defaulting to SHRINK.

@DaveCTurner DaveCTurner added >non-issue :Data Management/Indices APIs APIs to create and manage indices and templates v9.3.0 labels Oct 31, 2025
Mainly this is about removing the trappy implicit default master node
timeout in resize (shrink/split/clone) requests as per elastic#107984, but also
we drop the unnecessary `ActionType` subclass and the test-only
`ResizeRequestBuilder`, migrating the affected tests over to a new
`ResizeIndexTestUtils` instead. We also fix the order of index-name
arguments and make the `ResizeType` a mandatory parameter rather than
(trappily) defaulting to `SHRINK`.
@DaveCTurner DaveCTurner force-pushed the 2025/10/31/resize-action-cleanup branch from 4c28f55 to a6974e5 Compare October 31, 2025 19:27
@DaveCTurner DaveCTurner marked this pull request as ready for review October 31, 2025 20:37
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Oct 31, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@nielsbauman nielsbauman left a comment

Choose a reason for hiding this comment

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

I'm a fan of these changes, thanks a lot, David! I've left a few comments, but they're only nits.

Comment on lines +22 to +23
public enum ResizeIndexTestUtils {
;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there value in having this be an enum instead of a class (optionally with a private empty constructor)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't know really - we seem to do both and this is fewer LoC since you don't have to add the private empty constructor.

);
}

private CreateIndexRequest targetIndexRequest;
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you consider making this field final as well? It's only reassigned by ResizeRequest#setTargetIndex, which, as of this PR, is only used two times in ResizeRequestTests. This isn't a blocker for me, I'm fine leaving it as-is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did but tbh these tests are kinda questionable, and I didn't really want to rework them enough to avoid mutating this field. It's not a huge deal, really it's a bigger problem that the fields within CreateIndexRequest are themselves mutable, but that's a problem for another day.

Copy link
Contributor

@nielsbauman nielsbauman left a comment

Choose a reason for hiding this comment

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

LGTM, thanks David.

@DaveCTurner DaveCTurner enabled auto-merge (squash) November 3, 2025 16:39
@DaveCTurner DaveCTurner merged commit c925aa0 into elastic:main Nov 3, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Indices APIs APIs to create and manage indices and templates >non-issue Team:Data Management Meta label for data/management team v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants