Skip to content
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

[Improvement] Resolve possible thread-safe problems in KvBackend #643

Closed
yuqi1129 opened this issue Oct 30, 2023 · 0 comments · Fixed by #654
Closed

[Improvement] Resolve possible thread-safe problems in KvBackend #643

yuqi1129 opened this issue Oct 30, 2023 · 0 comments · Fixed by #654
Assignees
Labels
improvement Improvements on everything

Comments

@yuqi1129
Copy link
Contributor

What would you like to be improved?

Currently, Gravitino lacks access control when multi-thread access the storage layer and the result in uncertain under some circumstances.

How should we improve?

No response

@yuqi1129 yuqi1129 added the improvement Improvements on everything label Oct 30, 2023
@yuqi1129 yuqi1129 self-assigned this Oct 30, 2023
jerryshao pushed a commit that referenced this issue Nov 3, 2023
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements on everything
Projects
None yet
1 participant