Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Implement transactions cache to ensure idempotency of sendEvents #419

Closed
wants to merge 2 commits into from

Conversation

APwhitehat
Copy link
Contributor

Fixes #327 .
This implements transactions cache, which is used to ensure idempotency of clientapi:/rooms/{roomID}/send/{eventType}/{txnID} .
This can be extended as required to other events with txnID.

@erikjohnston: How to proceed further ?

Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com>
Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com>
@APwhitehat APwhitehat changed the title Implement transaction cache to ensure idempotency of sendEvents Implement transactions cache to ensure idempotency of sendEvents Mar 14, 2018

if txnID != nil {
// Try to fetch response from transactionsCache
res, err := transactionsCache.FetchTransaction(*txnID)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You made sure that there is a correlation to txnID so this should work but as you get a pointer of transactionsCache so I would add a null guard before accessing it.

@APwhitehat
Copy link
Contributor Author

closed in favour of #440, #444

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants