-
Notifications
You must be signed in to change notification settings - Fork 105
[Elasticsearch] Fix reporting of dropped by duplicate metrics #679
Conversation
Codecov Report
@@ Coverage Diff @@
## master #679 +/- ##
============================================
- Coverage 53.91% 53.87% -0.04%
+ Complexity 2964 2961 -3
============================================
Files 726 726
Lines 19423 19426 +3
Branches 1277 1279 +2
============================================
- Hits 10472 10466 -6
- Misses 8508 8514 +6
- Partials 443 446 +3
Continue to review full report at Codecov.
|
4099746 to
a86c7ae
Compare
|
@lmuhlha just to make sure I didn't miss it. The biggest changes I see you removed try() for tracer.withSpan and rapped connection.doto to private doto. Is there anything else big I've missed? |
|
@malish8632 most of the changes are cosmetic when i was comparing the classes. The important changes that provide the fix are The problem was that the version conflict format changed from the transport client to the rest client, and on top of that it appears to be nested inside another error. So it was being caught as a failure rather than dropped by duplicate. I can revert the cosmetic changes if need be, I just left them because I liked the more similar formatting. |
smstone
left a comment
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.
Is it possible to put cosmetic changes in a separate commit?
| ) { | ||
| return throwable -> { | ||
| if (ExceptionUtils.getRootCause(throwable) instanceof VersionConflictEngineException) { | ||
| if (throwable.getMessage().contains("version conflict")) { |
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.
Since we know what exceptions we want to deal with, why not just have a list of exceptions we act on, rather than string matching? I just wonder if the text will change at some point, which would cause this to break.
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.
Yeah that's what I was thinking as well. I think I tried going into the nested exception but I couldn't the other day.
Let me run it locally again and grab the exact errors and try again.
1aae450 to
a74602a
Compare
...t/elasticsearch/src/main/java/com/spotify/heroic/suggest/elasticsearch/SuggestBackendKV.java
Show resolved
Hide resolved
...earch-utils/src/main/java/com/spotify/heroic/elasticsearch/AbstractElasticsearchBackend.java
Show resolved
Hide resolved
ae58dc3 to
9473eba
Compare
5e64236 to
19def0f
Compare
No description provided.