# rpc error: code = Aborted desc = concurrency conflict: version mismatch

- **ID:** `go/grpc-aborted-concurrency`
- **Domain:** go
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The operation was aborted due to a concurrency conflict, such as an optimistic locking failure where the resource version changed.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   for {
    resource, err := client.Get(ctx, &GetRequest{Id: id})
    if err != nil { return err }
    resource.Data = newData
    _, err = client.Update(ctx, resource)
    if status.Code(err) != codes.Aborted {
        return err
    }
    // retry
}
   ```
2. **** (90% success)
   ```
   // Include version in the update request
req := &UpdateRequest{Id: id, Data: newData, Version: currentVersion}
_, err := client.Update(ctx, req)
if status.Code(err) == codes.Aborted {
    // handle conflict
}
   ```

## Dead Ends

- **** — The version is outdated; retrying with the same version will fail again. (100% fail)
- **** — This can lead to lost updates and data inconsistency. (90% fail)
