[Ingest Manager] Provide for conflict detection/resolution on Datasource update #69992
Labels
Feature:Endpoint
Elastic Endpoint feature
Team:Fleet
Team label for Observability Data Collection Fleet team
Describe the feature:
The Datasource service does not currently provide for a way to detect conflicts when multiple updates are performed at once. This opens us up to potentially nasty race conditions, as we have several places within the app where non-atomic datasource updates are performed.
Describe a specific use case for the feature:
One potential race condition is the following scenario:
Proposed solution:
Return a new
version
parameter when retrieving a Datasource which is equivalent to theversion
returned at the top level of the saved object. This version can be echoed back during Datasource update and used in theSavedObjectsClient.update()
call. If multiple modifications are attempted on same version, a409
will be returned and the client will have to try again.Example:
The text was updated successfully, but these errors were encountered: