-
Notifications
You must be signed in to change notification settings - Fork 58
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
[FEATURE] Let an extension query OpenSearch for all initialized extensions #149
[FEATURE] Let an extension query OpenSearch for all initialized extensions #149
Comments
Implementation should be similar to sendClusterSettingsRequest except the response would be a |
|
The reason why should start #151 first is because the purpose of #149 is to get initialization information based on extension's dependency, before that we should make sure the extension's dependency information which is #151 do. |
I like this line of thinking! When I originally wrote the issues I tried to make them independent of each other, but doing them in the order you propose will reduce the re-writing of code. |
The purpose of this issue is to generate a request for dependency information, and send it from Opensearch-sdk-java
Opensearch (feature/extensions)
|
If you create a new class for this, yes. If you use the
typo :) Also similar to the above comment, if you use the
I think the handler needs to be registered in OpenSearch, since that is the node responding to the request. On the ExtensionsRunner side (probably in the
You will need both a
The problem with using
|
@dbwiddis I agree with your first alternative of modifying |
OK, so we'd want to modify
|
Also @mloufra note in the original issue we can enable returning the whole list (if we pass null instead of the uniqueID, that unfiltered list should be the default) or a filtered list, so that can work into your logic process. |
Looks good with two tweaks:
|
@joshpalis @mloufra I've been thinking about this a bit more and I think restricting to a single Consider that on initialization, the I'm thinking rather than adding an
|
After more thought, I realized we need more than the strings; we'd need the whole object including ID and versions and potentially other information. This information is already in a map on the ExtensionsManager object so there is really no need to spend bandwidth sending it over transport; just send the |
Last Version of the Plan
|
Looks good, @mloufra! Only minor clarification is that the constant names you're calling "prefix" are two separate but same-named things. One is a string constant and one is an enum. It might not have been the best idea for us to use the same names for both, but you're fine to continue this pattern. |
Reopening as opensearch-project/OpenSearch#5658 was only part of the code. Needs #300 to be complete. |
Is your feature request related to a problem?
#108 will require extensions to be aware of what other extensions are initialized.
#102 (resolving #52 and #93) changed the initialization to only send one extension rather than the whole list. This is good because that list didn't have any status of the other extensions.
We need to be able to have an extension query OpenSearch to either obtain a list of initialized extensions or determine whether a particular extension is initialized.
What solution would you like?
This should be a simple Request/Response transport call fetching the values in the
List<DiscoveryExtension> extensionsInitializedList;
and returning it.Alternately (see #151) accept a list of uniqueIds and return a shortened list containing just those extensions.
Bonus points: do both.
What alternatives have you considered?
The ExtensionsOrchestrator could broadcast the list to all extensions after initialization is complete. The transport would essentially be the same with request/response reversed. However, in the case of dependent extensions, an extension may not fully respond to the initialization request until after its dependency has been initialized.
Do you have any additional context?
Eventually this feature can be embedded as part of initialization, with a polling feature to enforce initialization order of dependencies. And hope there's no circular dependency loop!
The text was updated successfully, but these errors were encountered: