-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deal with rare race condition in balance cache
When we create a balance cache, we lock the account, it is possible for another thread to post a GLTransaction, still uncommitted, that increases the last transaction ID. To prevent this without enforcing expensive locks on every account involving a GLTransaction post, we use a safe window (default to 1000, can be overriden but we believe 1000 is a safe value for use cases like jCard) when deciding the MaxID we use for a bcache entry.
- Loading branch information
Showing
2 changed files
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters