-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
SavedObjects update can cause version conflict errors even when not using optimistic concurrency control #126240
Comments
Pinging @elastic/kibana-core (Team:Core) |
We're working on RFC for improving search and search sessions, We have this code path where we with each search within a search session update a kibana/x-pack/plugins/data_enhanced/server/search/session/session_service.ts Lines 233 to 281 in 573fdce
cc @lukasolson, @ppisljar |
@Dosant it looks like Based on my understanding of search sessions I don't think it makes sense to share across spaces so sharing wouldn't be something we'd do in the future either, correct? |
Yes, this is correct.
Ok, indeed looks more like it. Basically what we want is for a saved object |
I ran into this problem again in some optimization work where I'm trying to parellelize two different async 'threads' that update two different fields on the same SO. Worth noting that I'm also wanting to use I was able to workaround this by using |
yeah agree #131371 closed this. |
To support sharing to multiple spaces #27004 the update operation adds a version check to be sure that the namespaces are still the same ones as verified by the pre-flight check:
kibana/src/core/server/saved_objects/service/lib/repository.ts
Line 1035 in d4b2a51
However, this means even if consumers of the API don't specify a
version
field, they can still get version conflicts for multi namespace saved objects.To work around this we should explore removing the preflight check and replacing it with a scripted update. The script should then validate the namespaces before updating the document.
Related: #82719
The text was updated successfully, but these errors were encountered: