-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#643] improvement(core): Improve and fix the possible concurrent pro…
…blem when visiting EntityStore (#654) ### What changes were proposed in this pull request? Introducing the `reentrantReadWriteLock` to alleviate possible concurrent problems to access the `KvEntityStore` ### Why are the changes needed? `KvEntityStore` subjects to concurrent problems when multi-thread access it at the same time. For instance, if there are multiple threads are attempting to save the entity with the same name identifier into the store. We must ensure that the entity can only be saved successfully once. Fix: #643 Fix: #618 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? New test case named `testConcurrentIssues` in `TestKvEntityStorage` added.
- Loading branch information
Showing
2 changed files
with
241 additions
and
75 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
Oops, something went wrong.