Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a note that users cannot send a duplicate tuples in the Write request (even if in writes and deletes) #919

Open
rhamzeh opened this issue Dec 20, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@rhamzeh
Copy link
Member

rhamzeh commented Dec 20, 2024

We should add a note in the transactional writes page that people cannot send duplicate tuples in the same request, even if they are across the delete/write

Example:
Request:

curl 'http://localhost:8080/stores/01JEC6JK6SNE650REAQYZ71CA5/write' \
  -H 'content-type: application/json' \
  --data-raw '{"authorization_model_id":"01JFGY272ZPRS9ARXD4F3D6GP9","writes":{"tuple_keys":[{"user":"user:anne","relation":"member","object":"group:2"}]},"deletes":{"tuple_keys":[{"user":"user:anne","relation":"member","object":"group:2"}]}}'

Response:

{"code":"cannot_allow_duplicate_tuples_in_one_request","message":"duplicate tuple in write: user: 'user:anne', relation: 'member', object: 'group:2'"}

Ref: https://cloud-native.slack.com/archives/C06G1NNH47N/p1734660203048149

@rhamzeh rhamzeh added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 20, 2024
@rhamzeh rhamzeh changed the title Add a note that users cannot send a duplicate tuple in the Write request (even if in writes and deletes) Add a note that users cannot send a duplicate tuples in the Write request (even if in writes and deletes) Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant