-
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
[BUG] ExtensionsRunner sendAddSettingsUpdateConsumerRequest fails #366
Comments
@dbwiddis The operator |
But if this if statement is going to compare content, then I think it should be use |
Based on my understand, the if statement |
If you want to do this, you'd need to implement One thing to think about, is how all these settings were created in the first place (start with the |
As you've seen, this particular |
Hello @dbwiddis, I would like to take this issue |
@dbwiddis I have a question, In which class to put this code:
In opensearch-sdk-java and in Opensearch there is no EnabledSetting class and it confuses me |
Hey @Kuanysh-kst sorry for the slow reply. I'm moving and am online far less than usual. The For this PR you can probably use our Hello World extension as a starting point; we have the |
Hi @Kuanysh-kst please do share if you have any other question. Hopefully above response from @dbwiddis helps you with working on this issue. Thanks |
hello, I'm working on this issue |
Hey @Kuanysh-kst just summarizing a lot of the above conversation to simplify things and hopefully help you:
|
hi @Kuanysh-kst are you still working on this issue? Do you need any help? |
@dbwiddis can we close this issue since the PR: opensearch-project/OpenSearch#7456 is merged? |
What is the bug?
ExtensionRunner.sendAddSettingsUpdateConsumerRequest()
is failing with unhelpful error messages.How can one reproduce the bug?
getSettings()
extension point:which calls
which calls
What is the expected behavior?
Settings update is registered.
Do you have any additional context?
The root cause of the problem is that the check for existence of the setting is reference equality (note the
!=
).But in the
AddSettingsUpdateConsumerRequestHandler.handleAddSettingsUpdateConsumerRequest()
method, we are extracting thesetting
argument from theWriteableSetting
.While the settings are
.equals()
(if that method existed) to each other, they are!=
to each other's reference.Additional bug: as noted in this comment the update request is only looking in the cluster settings (node scoped) but is not also looking in the index scoped settings (index scoped) object, so this also needs to be fixed.
Proposed fix
It might be that the reference equality is a bug and this bug could be fixed by changing it to.equals()
. However, I am not aware whether the reference equality is an intentional thing.As an alternative workaround, or in addition to fixing the equality check,thehandleAddSettingsUpdateConsumerRequest()
code above could be modified to look up the actual setting from the key passed in by the consumer. Even better, I'm not sure we need to go to the whole effort of sending the entire setting over transport in theAddSettingsUpdateConsumerRequest
. Just sending theString key
should be sufficient here.Also copying a comment from this issue, please address: opensearch-project/OpenSearch#4531 (comment)
The text was updated successfully, but these errors were encountered: