-
Notifications
You must be signed in to change notification settings - Fork 380
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
Should we explain how idempotency works? (SPEC-442) #699
Comments
Jira watchers: @richvdh |
I kinda agree the spec could be clearer, but I'm not entirely sure it's up to us to explain how transaction ids make idempotency work.
yes, it is. Specifically, https://github.com/matrix-org/matrix-doc/issues/666, where transaction IDs are explicitly mentioned.
Basically:
Yes, that is correct. Clients should probably make sure their transaction ids have a monotonic (eg, include the unix timestamp as a component) so that they don't need to worry about saving the used transaction ids.
The server needs to make sure that concurrent requests with the same txn id are treated the same as serialised requests with the same txn id. In practice, that means that the server needs to take a lock on the transaction id, and block subsequent requests for the transaction id until it has finished dealing with the first one. Synapse may or may not get this right!
long enough to be reasonably sure that a client isn't going to retry the request. In practice: anything above a few minutes will be fine. This is certainly something which should be specced.
sadness ensues. Technically the transaction list needs to be persisted to disk to avoid this. -- @richvdh |
FTR the title I originally gave this issue better represents what I was asking. Implementation details don't need to be enforced by the spec, but it should explain what the client can expect and what the server must guarantee. -- Jimmy Cuadra |
I don't really think this needs much more detail than it currently has. |
In any API that uses transaction IDs, the spec should explain a few things that it currently does not:
(Imported from https://matrix.org/jira/browse/SPEC-442)
(Reported by Jimmy Cuadra)
The text was updated successfully, but these errors were encountered: