Optimistic Concurrency does not work well with PostgreSQL state
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 378
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 6
Description
## Expected Behavior
When I save state with etag value, which is obsolete, I would expect to return false as a result.
## Actual Behavior
Following exception is thrown:
``` json
{
"errorCode": "ERR_STATE_SAVE",
"message": "failed saving state in state store ...: no item was updated"
}
```
Dapr version: 1.10.0
## Steps to Reproduce the Problem
1. Prepare environment with PostgreSQL DB instance.
2. Save some value into the state.
3. Get this state and retrieve etag from headers.
4. Save again but with etag, which is different than the last one.
Screenshots from tests:
GET:

POST:

State store configuration:
``` yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: pa******re
spec:
type: state.postgresql
version: v1
metadata:
- name: connectionString
value: "h****o"
scopes:
- p****d
```
Contributor guide
Assessment
This issue has not been assessed yet.