{"ref":"capability:concurrency-control","page":"/capabilities/concurrency-control","json":"/capabilities/concurrency-control.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"concurrency-control","name":"Concurrency control","domain":"data-and-persistence","ecosystems":["cap"],"universal":true,"description":"Stopping two people who opened the same record from silently overwriting each other — detecting that the version you read is no longer the version you are saving over.","short":"Stopping concurrent edits from silently overwriting each other","core_coverage":{"state":"core-and-community","assessed_at":"2026-09-27","relationship":"unassessed","what_core_does":"ETag-based optimistic concurrency: annotate an element as the version and the runtime rejects an update whose If-Match no longer holds.","where_it_stops":"At one record at a time, and at the protocol. It tells the second writer they lost; it does not merge, and it says nothing about a long-running edit, which is what draft handling exists for.","community_adds":"Locking inside a shared draft, which is the long-running edit the ETag does not reach: [cap-collaborative-draft](artifact:sleibach-cap-collaborative-draft) takes a lock per OData property and answers HTTP 409 to a second participant patching the same field. See [draft handling](capability:draft-handling) for the draft itself.","sources":[{"url":"https://cap.cloud.sap/docs/guides/providing-services#etag","title":"Providing Services — ETag / optimistic concurrency","checked":"2026-09-08"},{"url":"https://cap.cloud.sap/docs/guides/services/served-ootb#concurrency-control","title":"Generic Service Providers — Concurrency Control — capire","checked":"2026-09-27","quote":"Enable ETags by adding the @odata.etag annotation to an element to be used to calculate an ETag value as follows:"}]},"drafted_with_ai":true,"history":[{"date":"2026-09-27","field":"core_coverage","from":"without the runtime's page","to":"cites the runtime's page","reason":"P1 backfill 2026-09-27: the paragraph cited providing-services#etag, an address the guide has since moved; the ETag section now lives under Generic Service Providers and both the paragraph and the new @sap/cds edge cite it."},{"date":"2026-10-26","field":"core_coverage.state, core_coverage.relationship","from":"core-only","to":"core-and-community, relationship unassessed","reason":"Reassessed against the graph (check:capabilities): a community cds-plugin provides this capability on the CAP door, so the state no longer matched the providers; relationship left unassessed for want of documentary evidence of the history."},{"date":"2026-10-26","field":"core_coverage.community_adds","from":"(absent)","to":"Locking inside a shared draft: cap-collaborative-draft takes a lock per OData property and answers HTTP 409.","reason":"Reassessed against the graph (check:capabilities): states what the community provider adds beyond the ETag."}]},"sap_delivery":{"door":"cap","all":{"built_in":[{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json"},{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json"}],"documented_pattern":[],"announced":[],"packages":[]},"by_flavor":{"node":{"built_in":[{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json"}],"documented_pattern":[],"announced":[],"packages":[]},"java":{"built_in":[{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json"}],"documented_pattern":[],"announced":[],"packages":[]}}},"edges":{"use_cases":[],"shared_tasks":[],"related_tasks":[],"options":[{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:sleibach-cap-collaborative-draft","name":"cap-collaborative-draft","json":"/artifacts/sleibach-cap-collaborative-draft.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:abap2ui5-addons-lock-manager","name":"lock-manager","json":"/artifacts/abap2ui5-addons-lock-manager.json","ecosystem":"abap","origin_ring":"community-org"}],"samples":[],"explained_by":[{"ref":"content:handling-concurrent-updates-in-sap-cap-java","name":"Handling Concurrent Updates in SAP CAP Java","json":"/content/handling-concurrent-updates-in-sap-cap-java.json"},{"ref":"content:part-2-enrich-cap-based-services-with-behaviors-using-annotations","name":"[Part – 2] Enrich CAP based Services with Behaviors using Annotations","json":"/content/part-2-enrich-cap-based-services-with-behaviors-using-annotations.json"}],"normative_context":[]}}