-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Add new reindex-management module
#139400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
211783e to
c2f9be2
Compare
|
Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing) |
...management/src/main/java/org/elasticsearch/reindex/management/ReindexManagementFeatures.java
Show resolved
Hide resolved
...management/src/main/java/org/elasticsearch/reindex/management/ReindexManagementFeatures.java
Show resolved
Hide resolved
| # License v3.0 only", or the "Server Side Public License, v 1". | ||
| # | ||
|
|
||
| org.elasticsearch.reindex.management.ReindexManagementFeatures |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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
reindexmodule 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 reindexwill affect... - i.e. can adding a module info into
reindexbe 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...
There was a problem hiding this comment.
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.
PeteGillinElastic
left a comment
There was a problem hiding this 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...
...management/src/main/java/org/elasticsearch/reindex/management/ReindexManagementFeatures.java
Show resolved
Hide resolved
...management/src/main/java/org/elasticsearch/reindex/management/ReindexManagementFeatures.java
Show resolved
Hide resolved
samxbr
left a comment
There was a problem hiding this 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
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
reindex-managementmodule which will primarily contain new endpoints for reindex resilienceorg.elasticsearch.reindex.management