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

Gateway does not respect the long polling timeout received along with the activate jobs request #8389

Closed
romansmirnov opened this issue Dec 14, 2021 · 0 comments · Fixed by #8391
Assignees
Labels
kind/bug Categorizes an issue or PR as a bug scope/gateway Marks an issue or PR to appear in the gateway section of the changelog version:1.3.0 Marks an issue as being completely or in parts released in 1.3.0

Comments

@romansmirnov
Copy link
Member

Describe the bug
According to the API, long polling should behave the following:

https://github.com/camunda-cloud/zeebe/blob/12eeb3f81af0c1b65d2257cab52b71a712562757/gateway-protocol/src/main/proto/gateway.proto#L25-L28

The current implementation does not respect all these cases.

if the requestTimeout < 0, long polling is disabled and the request is completed immediately, even when no job is activated.

When a request is marked as repeatable, the request does not complete immediately even when no jobs are activated. In the worst case, the requests might be executed in an infinite loop (as long the request is still repeatable and the failed attempts are lower than the configured threshold).

The request will be completed when [...] after the requestTimeout (in ms).

As long as the request is marked as repeatable and the failed attempts count is lower than the configured threshold, the request timeout is not respected. Meaning, the request may be kept open longer than the given request timeout.

Expected behavior

  • When the request timeout is not present or negative, then the request should complete immediately, even when no job is activated.
  • In other cases, the request timeout is respected, i.e., the request completes at the latest when the request timeout is reached.

Environment:

  • Zeebe Version: 1.2.5
  • Configuration: Enabled Long Polling

is depended on by #8310

@romansmirnov romansmirnov added the kind/bug Categorizes an issue or PR as a bug label Dec 14, 2021
@romansmirnov romansmirnov self-assigned this Dec 14, 2021
@romansmirnov romansmirnov added this to In progress in Zeebe Dec 14, 2021
@romansmirnov romansmirnov added the scope/gateway Marks an issue or PR to appear in the gateway section of the changelog label Dec 14, 2021
@romansmirnov romansmirnov moved this from In progress to Review in progress in Zeebe Dec 16, 2021
@ghost ghost closed this as completed in 2c754a7 Dec 20, 2021
Zeebe automation moved this from Review in progress to Done Dec 20, 2021
ghost pushed a commit that referenced this issue Dec 20, 2021
8448: [Backport stable/1.2] deps(maven): bump version.elasticsearch from 7.16.1 to 7.16.2 r=menski a=npepinpe

Bumps `version.elasticsearch` from 7.16.1 to 7.16.2.

Updates `elasticsearch-x-content` from 7.16.1 to 7.16.2
- [Release notes](https://github.com/elastic/elasticsearch/releases)
- [Commits](elastic/elasticsearch@v7.16.1...v7.16.2)

Updates `elasticsearch-rest-client` from 7.16.1 to 7.16.2
- [Release notes](https://github.com/elastic/elasticsearch/releases)
- [Commits](elastic/elasticsearch@v7.16.1...v7.16.2)

---
updated-dependencies:
- dependency-name: org.elasticsearch:elasticsearch-x-content
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.elasticsearch.client:elasticsearch-rest-client
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 4f41e4f)

8450: [Backport stable/1.2] fix(polling): respect request timeout settings r=oleschoenburg a=github-actions[bot]

# Description
Backport of #8391 to `stable/1.2`.

relates to #8310 #8389

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Menski <sebastian.menski@camunda.com>
Co-authored-by: Roman <roman.smirnov@camunda.com>
Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
ghost pushed a commit that referenced this issue Dec 20, 2021
8447: [Backport stable/1.1] deps(maven): bump version.elasticsearch from 7.16.1 to 7.16.2 r=menski a=npepinpe

Bumps `version.elasticsearch` from 7.16.1 to 7.16.2.

Updates `elasticsearch-x-content` from 7.16.1 to 7.16.2
- [Release notes](https://github.com/elastic/elasticsearch/releases)
- [Commits](elastic/elasticsearch@v7.16.1...v7.16.2)

Updates `elasticsearch-rest-client` from 7.16.1 to 7.16.2
- [Release notes](https://github.com/elastic/elasticsearch/releases)
- [Commits](elastic/elasticsearch@v7.16.1...v7.16.2)

---
updated-dependencies:
- dependency-name: org.elasticsearch:elasticsearch-x-content
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.elasticsearch.client:elasticsearch-rest-client
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 4f41e4f)

8449: [Backport stable/1.1] fix(polling): respect request timeout settings r=oleschoenburg a=github-actions[bot]

# Description
Backport of #8391 to `stable/1.1`.

relates to #8310 #8389

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Menski <sebastian.menski@camunda.com>
Co-authored-by: Roman <roman.smirnov@camunda.com>
Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
ghost pushed a commit that referenced this issue Dec 20, 2021
8451: [Backport release-1.3.0] fix(polling): respect request timeout settings r=oleschoenburg a=github-actions[bot]

# Description
Backport of #8391 to `release-1.3.0`.

relates to #8310 #8389

Co-authored-by: Roman <roman.smirnov@camunda.com>
Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
@korthout korthout added the version:1.3.0 Marks an issue as being completely or in parts released in 1.3.0 label Jan 4, 2022
@KerstinHebel KerstinHebel removed this from Done in Zeebe Mar 23, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes an issue or PR as a bug scope/gateway Marks an issue or PR to appear in the gateway section of the changelog version:1.3.0 Marks an issue as being completely or in parts released in 1.3.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants