-
Notifications
You must be signed in to change notification settings - Fork 54
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
fix: Synchronize EDR refresh #1633
base: bugfix/0.7.7
Are you sure you want to change the base?
fix: Synchronize EDR refresh #1633
Conversation
aecad9a
to
944ff4d
Compare
core/edr-core/src/main/java/org/eclipse/tractusx/edc/edr/core/service/EdrServiceImpl.java
Outdated
Show resolved
Hide resolved
.../eclipse/tractusx/edc/edr/spi/testfixtures/index/lock/EndpointDataReferenceLockBaseTest.java
Outdated
Show resolved
Hide resolved
...re/src/main/java/org/eclipse/tractusx/edc/edr/core/lock/DefaultEdrLockProviderExtension.java
Outdated
Show resolved
Hide resolved
core/edr-core/src/main/java/org/eclipse/tractusx/edc/edr/core/lock/InMemoryEdrLock.java
Outdated
Show resolved
Hide resolved
core/edr-core/src/main/java/org/eclipse/tractusx/edc/edr/core/lock/InMemoryEdrLock.java
Outdated
Show resolved
Hide resolved
import org.junit.jupiter.api.BeforeEach; | ||
|
||
@ComponentTest | ||
class InMemoryEdrLockTest extends EndpointDataReferenceLockBaseTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests for releaseLock
missing. there should be some in the base test class, and specific tests in the in-mem test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, regarding the inmem lock; if access to the hashmap is atomic, the global lock isn't needed anymore. |
core/edr-core/src/main/java/org/eclipse/tractusx/edc/edr/core/lock/InMemoryEdrLock.java
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
WHAT
Introduces a synchronization mechanism with database locks that only allows one request to update an expired token at a time. All other requests wait until the first request updates the token and releases the database.
WHY
To fix the issue described in #1618
FURTHER NOTES
PR to bugfix/0.7.7 first because it's a priority to have that merged.
Closes #1618