-
Notifications
You must be signed in to change notification settings - Fork 161
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
Cache exception handling improvement #3183
Cache exception handling improvement #3183
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3183 +/- ##
=============================================
- Coverage 63.06% 62.97% -0.10%
+ Complexity 2489 2485 -4
=============================================
Files 1118 1118
Lines 23146 23203 +57
Branches 2004 2007 +3
=============================================
+ Hits 14597 14612 +15
- Misses 7627 7668 +41
- Partials 922 923 +1
|
commons/src/main/java/org/eclipse/kapua/commons/service/internal/cache/EntityCache.java
Outdated
Show resolved
Hide resolved
commons/src/main/java/org/eclipse/kapua/commons/service/internal/cache/EntityCache.java
Outdated
Show resolved
Hide resolved
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.
the pr looks good to me.
If you can just remove the 2 spaces in a couple of javadocs will be good
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.
the pr looks good to me.
If you can just remove the 2 spaces in a couple of javadocs will be good
Signed-off-by: Gianluca Barbon <gianluca.barbon@eurotech.com>
3797363
to
bda3532
Compare
This PR introduces cache exception handling in the
EntityCache
class and its subclasses.Related Issue
n/a
Description of the solution adopted
Cache errors are usually handled by the cache client (that implements the JCache interface). However, in some cases the exceptions are thrown by the cache client itself (e.g. a timeout exception). Since we are agnostic w.r.t. the underlying JCache implementation, we cannot catch precise exceptions. Thus, this PR introduces a way to treat such exceptions properly, in a conservative way w.r.t. the data, and to log them via the logger and the metrics.
Screenshots
n/a
Any side note on the changes made
n/a