-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Random errors when bulk-updating document objects via painless script #56414
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
Comments
Force stopping a DF analytics job whose config exists and that is stopped should succeed. This was broken by elastic#56360. Closes elastic#56414
@dimitris-athanasiou I'm not sure how this fixes the issue I've reported above... Are you sure about the issue number ? Wasn't it #56419 ? |
@consulthys I think you are right, this bug has been accidentally closed via a commit message |
Pinging @elastic/es-core-infra (:Core/Infra/Scripting) |
This should always fail, we'll try to reproduce. |
@stu-elastic Note that I can still reproduce this in 8.13.3 |
params is unfortunately not read-only. In some cases it can become read-only (eg passing script object over the wire), but making it read-only across all script contexts is a technically breaking change. |
Pinging @elastic/es-core-infra (Team:Core/Infra) |
I tested again on 8.17.3 and it now fails consistently. |
@consulthys would you consider this fixed then? My reading of the original issue is that the bug was the inconsistency, not that there was an error. |
@rjernst yes, that's correct, I originally didn't mind the error, just the inconsistency of it being sometimes reported sometimes not. Feel free to close it. |
Elasticsearch version (
bin/elasticsearch --version
): 7.6.1 on Elastic CloudPlugins installed: N/A
JVM version (
java -version
): Elastic CloudOS version (
uname -a
if on a Unix-like system): Elastic CloudDescription of the problem including expected versus actual behavior:
I'm getting inconsistent and sporadic errors while updating documents (via script) through the
_bulk
API. The issue only happens when trying to update objects (i.e. JSON hash) inside the document.Steps to reproduce:
Here is a way to easily reproduce the problem.
1. First create a sample index+document
2. Create a script to be used in the bulk update
The script simply replaces the existing
hash
field with whatever it receives inside theparams
and adds another field to that hash:Now the thing is that sometimes the response is OK
and sometimes it yields this:
Now I know that
params
is not modifiable and I'm trying to add a field to it. The error is pretty clear. But I would expect that it always fails, not randomly.Also worth noting that it makes no difference whether the index has one primary shard or more.
The text was updated successfully, but these errors were encountered: