# rpc error: code = Aborted desc = concurrent modification detected

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

## Root Cause

The server detected a concurrent modification conflict, often due to optimistic locking or transaction conflicts.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   for i := 0; i < 5; i++ {
    resp, err := client.YourMethod(ctx, req)
    if err == nil { break }
    if status.Code(err) == codes.Aborted {
        time.Sleep(time.Duration(1<<i) * time.Second)
        continue
    }
    return err
}
   ```
2. **** (85% success)
   ```
   // Include a version field in your request and have the server check it.
// On conflict, fetch the latest version and retry.
   ```

## Dead Ends

- **** — Immediate retries can exacerbate contention and lead to more conflicts. (80% fail)
- **** — Disabling concurrency control can lead to data corruption and is not acceptable. (95% fail)
