---
title: "Discussion on \"Prevent lost updates with ETag and If-Match: optimistic concurrency in OpenAPI\" | Hashnode"
description: "Discussion on \"Prevent lost updates with ETag and If-Match: optimistic concurrency in OpenAPI\". Two clients PUT the same resource and the last write silently wins. The HTTP fix is conditional requests with ETag, If-Match, and a 412 that tells the client to re-fetch and retry. Here is the exact state table and the OpenAPI that makes codegen and AI agents handle conflicts cor"
url: "https://hashnode.com/posts/openapi-etag-optimistic-concurrency-if-match/6aca07a7a1275270452d8831"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Prevent lost updates with ETag and If-Match: optimistic concurrency in OpenAPI](https://blogs.powerduck.com/openapi-etag-optimistic-concurrency-if-match?utm_source=hashnode&utm_medium=feed)

Two clients PUT the same resource and the last write silently wins. The HTTP fix is conditional requests with ETag, If-Match, and a 412 that tells the client to re-fetch and retry. Here is the exact state table and the OpenAPI that makes codegen and AI agents handle conflicts cor

Oct 7 · 6 min read · blogs.powerduck.com  
Read the article

-   [#openapi](https://hashnode.com/tag/openapi)
-   [#concurrency](https://hashnode.com/tag/concurrency)
-   [#api-design](https://hashnode.com/tag/api-design)
-   [#reliability](https://hashnode.com/tag/reliability)

## Written by

[Powerduck](https://hashnode.com/@powerduck)

@powerduck · hon

  
[View profile](https://hashnode.com/@powerduck)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
