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

Improve Upsert Failed Error Message in Elasticsearch REST Client #3297

Merged

Conversation

lorthirk
Copy link

Improve error message of Upsert failed error messages in Elasticsearch REST Client

Before:

09:29:23.058 [Camel (camelContext) thread #14 - JmsConsumer[Consumer.eurotech:mainRoutelisteners:EXACTLY_ONCE.VirtualTopic.%3E]] INFO  o.e.k.s.e.c.r.RestElasticsearchClient - Upsert failed [.1-metric, _doc, Empty error message]
09:29:23.058 [Camel (camelContext) thread #14 - JmsConsumer[Consumer.eurotech:mainRoutelisteners:EXACTLY_ONCE.VirtualTopic.%3E]] INFO  o.e.k.s.e.c.r.RestElasticsearchClient - Upsert failed [.1-metric, _doc, Empty error message]
09:29:23.058 [Camel (camelContext) thread #14 - JmsConsumer[Consumer.eurotech:mainRoutelisteners:EXACTLY_ONCE.VirtualTopic.%3E]] INFO  o.e.k.s.e.c.r.RestElasticsearchClient - Upsert failed [.1-metric, _doc, Empty error message]
09:29:23.058 [Camel (camelContext) thread #14 - JmsConsumer[Consumer.eurotech:mainRoutelisteners:EXACTLY_ONCE.VirtualTopic.%3E]] INFO  o.e.k.s.e.c.r.RestElasticsearchClient - Upsert failed [.1-metric, _doc, Empty error message]
09:29:23.058 [Camel (camelContext) thread #14 - JmsConsumer[Consumer.eurotech:mainRoutelisteners:EXACTLY_ONCE.VirtualTopic.%3E]] INFO  o.e.k.s.e.c.r.RestElasticsearchClient - Upsert failed [.1-metric, _doc, Empty error message]

After:

10:56:56.557 [Camel (camelContext) thread #11 - JmsConsumer[Consumer.eurotech:mainRoutelisteners:EXACTLY_ONCE.VirtualTopic.%3E]] INFO  o.e.k.s.e.c.r.RestElasticsearchClient - Upsert failed [.1-metric, _doc, [_doc][GUO_n3FE7jiBZSt7VHxsQ08ilGK-159vwTD8m8zrTl0]: version conflict, document already exists (current version [1])]
10:56:57.851 [Camel (camelContext) thread #11 - JmsConsumer[Consumer.eurotech:mainRoutelisteners:EXACTLY_ONCE.VirtualTopic.%3E]] INFO  o.e.k.s.e.c.r.RestElasticsearchClient - Upsert failed [.1-metric, _doc, [_doc][m2E9Qg_ZsAb-IYzAFODHkhUZTuYAxvoQTcq7R0QVBIM]: version conflict, required seqNo [1], primary term [1]. current document has seqNo [4] and primary term [1]]
10:57:06.856 [Camel (camelContext) thread #4 - JmsConsumer[Consumer.eurotech:mainRoutelisteners:EXACTLY_ONCE.VirtualTopic.%3E]] INFO  o.e.k.s.e.c.r.RestElasticsearchClient - Upsert failed [.1-metric, _doc, [_doc][GUO_n3FE7jiBZSt7VHxsQ08ilGK-159vwTD8m8zrTl0]: version conflict, document already exists (current version [1])]
10:57:08.206 [Camel (camelContext) thread #4 - JmsConsumer[Consumer.eurotech:mainRoutelisteners:EXACTLY_ONCE.VirtualTopic.%3E]] INFO  o.e.k.s.e.c.r.RestElasticsearchClient - Upsert failed [.1-metric, _doc, [_doc][EnIYPCHV9mQxlXr698sbts6Um0IVzuHwsKFqrupVU2g]: version conflict, required seqNo [2], primary term [1]. current document has seqNo [5] and primary term [1]]
10:57:11.682 [Camel (camelContext) thread #4 - JmsConsumer[Consumer.eurotech:mainRoutelisteners:EXACTLY_ONCE.VirtualTopic.%3E]] INFO  o.e.k.s.e.c.r.RestElasticsearchClient - Upsert failed [.1-metric, _doc, [_doc][LVjuE4Gpng8yqdiwsbPiMhaWO1IxAHLCYwMHqCwBZDM]: version conflict, required seqNo [3], primary term [1]. current document has seqNo [6] and primary term [1]]

Related Issue
No related issues

Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
@lorthirk lorthirk added the Enhancement This PR/Issue improves an part of Kapua label Apr 23, 2021
@lorthirk lorthirk requested a review from Coduz April 23, 2021 11:01
@codecov
Copy link

codecov bot commented Apr 23, 2021

Codecov Report

Merging #3297 (c50502a) into develop (f9a15d3) will decrease coverage by 6.21%.
The diff coverage is 0.00%.

❗ Current head c50502a differs from pull request most recent head 7a3971a. Consider uploading reports for the commit 7a3971a to get more accurate results
Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3297      +/-   ##
=============================================
- Coverage      54.24%   48.03%   -6.22%     
+ Complexity       788      772      -16     
=============================================
  Files           1476     1476              
  Lines          30162    30165       +3     
  Branches        2520     2521       +1     
=============================================
- Hits           16361    14489    -1872     
- Misses         12890    14860    +1970     
+ Partials         911      816      -95     
Impacted Files Coverage Δ Complexity Δ
...ticsearch/client/rest/RestElasticsearchClient.java 56.28% <0.00%> (-12.00%) 0.00 <0.00> (ø)
...lipse/kapua/service/tag/internal/TagQueryImpl.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
.../job/engine/exception/JobMissingStepException.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
.../kapua/service/tag/internal/TagListResultImpl.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...job/engine/exception/KapuaJobEngineErrorCodes.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...pua/service/account/internal/AccountQueryImpl.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...a/service/account/internal/AccountCreatorImpl.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...ervice/account/internal/AccountListResultImpl.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...rvice/account/internal/KapuaAccountErrorCodes.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...rvice/endpoint/internal/EndpointInfoQueryImpl.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
... and 143 more

@lorthirk lorthirk merged commit a2e1700 into eclipse-kapua:develop Apr 27, 2021
@lorthirk lorthirk deleted the fix-improveEsUpsertFailedErrorMessage branch April 27, 2021 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This PR/Issue improves an part of Kapua
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants