Skip to content

Conversation

@szybia
Copy link
Contributor

@szybia szybia commented Dec 11, 2025

  • Add new reindex-management module which will primarily contain new endpoints for reindex resilience
    • extends reindex to get access to FeatureFlag
    • all functionality gated behind FeatureFlag so no changes in release builds
    • new package org.elasticsearch.reindex.management
    • defines new NodeFeature to-be-used by endpoints to guard multi-cluster calls where some nodes might not support new endpoints
    • i've tested rebasing my cancel impl on top of this and works swell

@szybia szybia force-pushed the reindex-mgmt-new-module branch from 211783e to c2f9be2 Compare December 12, 2025 12:11
@szybia szybia added >non-issue :Distributed Indexing/Reindex Issues relating to reindex that are not caused by issues further down labels Dec 12, 2025
@szybia szybia marked this pull request as ready for review December 12, 2025 12:22
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Indexing Meta label for Distributed Indexing team label Dec 12, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing)

# License v3.0 only", or the "Server Side Public License, v 1".
#

org.elasticsearch.reindex.management.ReindexManagementFeatures
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need to add the class to module-info.java (similar to this)?

Copy link
Contributor Author

@szybia szybia Dec 15, 2025

Choose a reason for hiding this comment

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

that makes sense, i forgot about the module-info.java file in this PR

working on it...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TL;DR: hit a snag, time-boxed myself to it, and i'm proposing not doing this in the interest of limiting changes here, and time-spent/ROI

but someone more knowledgeable can overrule me or advise here...

long version (as a person not well-acquainted with java modules):

  • iiuc, to add module info i'll need to add a module info into reindex module too to put it into module path
  • in order to feel comfortable doing so, i'll need to pay the ignorance tax and familiarize myself with java modules a bit more, given i'm not sure what adding a module-info to reindex will affect...
  • i.e. can adding a module info into reindex be a breaking change in any way?
  • my assumption is not, but i'd need to investigate further to assert that and be able to press merge with my name under it
  • in the meantime, doesn't strike me as something blocking...

Copy link
Member

Choose a reason for hiding this comment

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

For the record: I agree that you should skip the module info.

If you have one, then you need to make sure you update it to include the SPI binding, because otherwise it won't find it. But if you don't have one (so your classes are going into the unnamed module), it works just fine with the META-INF/services alone.

And adding one here would mean adding one to all of its transitive dependencies, as you point out. And the last time we attempted that, we found that reindex depends on some REST client module whose name I forget (which it uses for reindex-from-remote) which is on Java 8 (presumably so users who are still on JDK 8 are able to use it — and, despite the fact that JDK 8 came out in 2014, it is under 'extended support' until 2030). And Java 8 doesn't have modules, resulting in some kind of compilation error (details of which I also forget). There's probably something smart we could do to work around this — maybe we use multi-release JARs or something? — but I don't think it's worth the considerable effort.

Copy link
Member

@PeteGillinElastic PeteGillinElastic 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.

Not sure whether we should wait for Ryan to look or not...

@szybia szybia requested a review from samxbr December 15, 2025 13:11
Copy link
Contributor

@samxbr samxbr left a comment

Choose a reason for hiding this comment

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

LGTM, +1 on nothing under discussion needs to block this PR

szybia and others added 2 commits December 15, 2025 19:32
my understanding: these tests add a new node that must have the same NodeFeature
definitions as the `testClusters` cluster started by gradle in order to
be able to join the cluster.

therefore we need to drag it in here too so the NodeFeatures exist on
new nodes.

i've checked other PR which added `javaRestTestImplementation` to this
file and they all seem to introduce new NodeFeatures and a matching entry in this
file, similar to me:
1. https://github.com/elastic/elasticsearch/pull/104466/changes#diff-c7c94cdf3a65fbfe4a3f736a490eccef193ad9aa29c6f5e4e5c125a6049048faR18
2. https://github.com/elastic/elasticsearch/pull/114168/changes#diff-c7c94cdf3a65fbfe4a3f736a490eccef193ad9aa29c6f5e4e5c125a6049048faR21
3. https://github.com/elastic/elasticsearch/pull/112348/changes#diff-c7c94cdf3a65fbfe4a3f736a490eccef193ad9aa29c6f5e4e5c125a6049048faR20
@szybia szybia enabled auto-merge (squash) December 15, 2025 20:36
@szybia szybia merged commit 2132b0f into elastic:main Dec 15, 2025
37 checks passed
@szybia szybia deleted the reindex-mgmt-new-module branch December 15, 2025 22:24
parkertimmins pushed a commit to parkertimmins/elasticsearch that referenced this pull request Dec 17, 2025
@szybia szybia mentioned this pull request Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Indexing/Reindex Issues relating to reindex that are not caused by issues further down >non-issue Team:Distributed Indexing Meta label for Distributed Indexing team v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants