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

ConsulTxnStore: handle failure in read/get transaction #1301

Merged

Conversation

timvaillancourt
Copy link
Contributor

Related issue: #1300

Description

This PR resolves a panic when the ConsulTxnStore returns a nil transaction response due to an error in the transaction

Following this PR errors in the read transaction (to check existing values) will be logged and will cause the store to perform an update of the keys in the read transaction, as we can't be sure they're consistent if there is a read transaction error

Lastly, this PR adds better unit testing for this issue. Fixes #1300

@timvaillancourt
Copy link
Contributor Author

timvaillancourt commented Feb 13, 2021

With the exception of #1302 (separate PR to come!) I've confirmed this fixes the majority of the issues found when testing the consulTxnStore on a large, real-world environment

Ready for @shlomi-noach to review 🙇

Copy link
Collaborator

@shlomi-noach shlomi-noach left a comment

Choose a reason for hiding this comment

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

thank you!

@shlomi-noach shlomi-noach merged commit a7ed395 into openark:master Feb 15, 2021
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.

ConsulTxnStore: panic when get transaction returns error
2 participants