linkedin / ambry

Distributed object store
https://github.com/linkedin/ambry/wiki
Apache License 2.0
1.75k stars 275 forks source link

Fix missing data chunk metric #2867

Closed justinlin-linkedin closed 2 months ago

justinlin-linkedin commented 2 months ago

Summary

We have a missing data chunk error count metric to record the number of get blob operations that encountered a missing data chunk error. However, this metric is incremented in the wrong place, we increment it every time we see a NOT_FOUND response from any replica, this is not very useful.

This PR fixes that and only increments this counter metric at the end of get chunk operation when it fails with Blob_Not_Found error.

Test

Unit test

codecov-commenter commented 2 months ago

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 70.13%. Comparing base (52ba813) to head (f8cdeac). Report is 78 commits behind head on master.

Files Patch % Lines
...java/com/github/ambry/router/GetBlobOperation.java 25.00% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2867 +/- ## ============================================ + Coverage 64.24% 70.13% +5.88% - Complexity 10398 11787 +1389 ============================================ Files 840 851 +11 Lines 71755 72539 +784 Branches 8611 8729 +118 ============================================ + Hits 46099 50873 +4774 + Misses 23004 19043 -3961 + Partials 2652 2623 -29 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.