-
Notifications
You must be signed in to change notification settings - Fork 292
Conversation
Codecov Report
@@ Coverage Diff @@
## master #960 +/- ##
============================================
+ Coverage 54.06% 54.08% +0.02%
Complexity 1758 1758
============================================
Files 320 318 -2
Lines 9602 9589 -13
Branches 873 872 -1
============================================
- Hits 5191 5186 -5
+ Misses 4093 4086 -7
+ Partials 318 317 -1
Continue to review full report at Codecov.
|
@Kunal-Jha please, add some more information to the PR description and update it following the template. It should have the Jira ticket link as a minimum requirement, when there is a correspondent jira ticket. If you don't have all the information required by the template, please delete such info from the template. |
try { | ||
timeLagFuture = timeLagHandler.getCursorTimeLagFuture(cursor); | ||
} catch (TimeoutException e) { | ||
LOG.error("Time lag request timed out"); |
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.
I'm afraid this doesn't fix all possible problems regarding timeouts.
This exception you silenced here would be thrown in case the semaphore tryAcquire
fails. But we could also have another timeout in case the future was successfully scheduled for execution but did not finish within the expected time.
This is handled by lines 88/95. So I think that a fix for this should make sure that it doesn't launch 422 in case of failed time lag computation, be it in the semaphore or the future by itself.
…into aruha-1804-bugfix
src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java
Show resolved
Hide resolved
src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java
Outdated
Show resolved
Hide resolved
} catch (RejectedExecutionException|TimeoutException | ExecutionException e) { | ||
LOG.warn("caught exception the timelag stats are not complete"); | ||
} catch (Throwable e){ | ||
LOG.warn("caught throwable the timelag stats are not complete"); |
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.
Please, log the exception as well.
@Kunal-Jha now that we are no longer throwing those exception, I did a search in the project to see if they were used somewhere else and found out that they are handled by |
src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java
Outdated
Show resolved
Hide resolved
src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java
Outdated
Show resolved
Hide resolved
src/test/java/org/zalando/nakadi/service/SubscriptionTimeLagServiceTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/zalando/nakadi/service/SubscriptionTimeLagServiceTest.java
Outdated
Show resolved
Hide resolved
@Kunal-Jha please, rebase/merge this branch and I'll approve. |
👍 |
deploy validation please |
@Kunal-Jha during validation I realised we forgot to update the documentation for this attribute. Please change the description for |
docs/_data/nakadi-event-bus-api.yaml
Outdated
@@ -1442,7 +1442,10 @@ paths: | |||
- $ref: '#/parameters/SubscriptionId' | |||
- name: show_time_lag | |||
in: query | |||
description: show consumer time lag | |||
description: shows consumer time lag as an optional field. |
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.
I think you need to use the "|" for paragraphs in OpenAPI, please check an example where you can find description: |
docs/_data/nakadi-event-bus-api.yaml
Outdated
@@ -1445,7 +1445,8 @@ paths: | |||
description: shows consumer time lag as an optional field. | |||
This option is a time consuming operation and Nakadi attempts to compute it in the best possible strategy. | |||
In cases of failures, resulting in Nakadi being unable to compute it within a configurable timeout, | |||
the field might not be present in the output. | |||
the field might either be partially present or not present (dependiong on the number of successful requests) |
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.
s/dependiong/depending/
docs/_data/nakadi-event-bus-api.yaml
Outdated
@@ -1442,10 +1442,11 @@ paths: | |||
- $ref: '#/parameters/SubscriptionId' | |||
- name: show_time_lag | |||
in: query | |||
description: shows consumer time lag as an optional field. | |||
description: | | |||
Shows consumer time lag as an optional field. |
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.
You need to ident the content with 2 extra spaces.
👍 |
1 similar comment
👍 |
One-line summary
Description
In case of the requesting stats for subscription with stale offsets and show_time_lag, unreported status code is displayed.
Goal: Instead all the stats till the timeout should be returned
Ticket