-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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] dynamic method [java.lang.String, sha256/0] not available in _reindex Painless script #16423
Comments
Elasticsearch is a different product. Try reproducing on the latest open source version of OpenSearch (2.17)? A failing YAML REST test would be helpful, https://github.com/opensearch-project/OpenSearch/blob/main/TESTING.md#testing-the-rest-layer. |
I don't think we need to dive depper into this rabbit hole. I think it's obvious that if this bug was present in ES up to recent times it's very likely that it is or was also present in OS, unless you guys found it and fixed it (no way for me to know - hence this report/question) or someone else reported it and you fixed it (does not seem to be the case).
Sorry, I lack the motivation to spend time on that because I could not use it even if I wanted to as AWS does not offer it, only 2.15. This is not an issue that would make me host the entire cluster myself just to get 2.17 and doing an upgrade of a cluster with millions of documents in it to 2.15 just to find out if you guys maybe fixed this also does not sound like a reasonable course of action to me. Would it be better to raise this issue directly with AWS support? |
I meant to try it locally with docker, which is easy. I started OpenSearch with Inserted a document into an index.
Tried to reindex.
It failed with the same problem.
So it's not fixed. Amazon managed service gets updated often, I don't have an ETA for 2.17, but I would imagine it's not far out, but it won't help here. We need to fix the bug. If someone wants to PR a fix please be mindful that you cannot take non-APLv2-compatible code from Elasticsearch. I'd write a REST YAML test to begin with and the debug the actual issue. |
Thanks. You forgot to take |
Yes, that's right, I don't have
|
Looking at this closer @dkvasnicka, why would you expect Updating the ID works fine (e.g. |
Unfortunately the OS documentation has pretty much zero content on the Painless language, available functions, contexts etc. So I went by the fact that it's defined in the Painless module in a class that says However, as you pointed out the methods seem to be only whitelisted for Ingest pipelines scripts, nothing else, and now I see the commit that introduced this clearly mentions it. So technically speaking this is not a bug. ES decided to eventually whitelist these methods for all contexts but that's obviously their decision, what you do is up to you. Also, since ingest pipelines can be executed during the |
Thanks @dkvasnicka, I think we got to the bottom of this. I don't see why we wouldn't want to allow-list this method for |
Describe the bug
When executing a
_reindex
call during which I want to use ascript
to change the ID of each document I'm getting:This was supposedly fixed in ES this April (no associated PR as of now): elastic/elasticsearch#107556
My AWS console says an upgrade to 2.15 is available so if this is no longer an issue in this version please let me know 🙏
Related component
Indexing
To Reproduce
Expected behavior
Source index is fully reindexed into the dest index with ID of each document being equal to SHA-256 of the selected String field.
Additional Details
Host/Environment (please complete the following information):
Amazon OpenSearch Service
OpenSearch 2.13
OpenSearch_2_13_R20240520-P5
The text was updated successfully, but these errors were encountered: