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

SetVariables is not always retryable #15549

Closed
lenaschoenburg opened this issue Dec 11, 2023 · 1 comment · Fixed by #18180
Closed

SetVariables is not always retryable #15549

lenaschoenburg opened this issue Dec 11, 2023 · 1 comment · Fixed by #18180
Assignees
Labels
component/clients component/zeebe Related to the Zeebe component/team kind/bug Categorizes an issue or PR as a bug severity/mid Marks a bug as having a noticeable impact but with a known workaround version:8.4.7 Marks an issue as being completely or in parts released in 8.4.7 version:8.5.1 Marks an issue as being completely or in parts released in 8.5.1

Comments

@lenaschoenburg
Copy link
Member

With #15230 we introduced a default service configuration that marks the SetVariables call as retryable on UNAVAILABLE, RESOURCE_EXHAUSTED, and DEADLINE_EXCEEDED:

https://github.com/camunda/zeebe/blob/f80144b951c9bd6b40d82dc10a428a1fcb4485bd/gateway-protocol-impl/src/main/resources/gateway-service-config.json#L3-L25

Since SetVariables is an imperative command that simply sets the variables for a given element instance, it should not be retried without the user knowing. After the first SetVariables was processed but the response timed out with DEADLINE_EXCEEDED, the process instance may make progress and change state such that a retried SetVariables may not be correct.

SetVariables stands out compared to the other methods currently marked as retryable such as CompleteJob, ResolveIncident, which are idempotent such that an accidental retry simply has no effect. It is more like PublishMessage or ModifyProcessInstance which can't always be retried.

@lenaschoenburg lenaschoenburg added kind/bug Categorizes an issue or PR as a bug component/clients labels Dec 11, 2023
@nicpuppa nicpuppa added the severity/mid Marks a bug as having a noticeable impact but with a known workaround label Dec 21, 2023
@nicpuppa
Copy link
Contributor

ZPA Triage:

  • Size small as the implementation seems straight forward
  • Priority upcoming as seems to be bad for the java client
  • Severity is mid because there are multiple workarounds
  • Is a good candidate for mob-programming

@romansmirnov romansmirnov added the component/zeebe Related to the Zeebe component/team label Mar 5, 2024
github-merge-queue bot pushed a commit that referenced this issue May 6, 2024
)

## Description
SetVariable endpoint is making changes on the state of the process
instance. Therefore, it is not idempotent. If we retry setting variables
in different stages of process instance, it might provide different
behaviour. Because of that we shouldn't retry SetVariables on timeouts
(DEADLINE_EXCEEDED) where the processing of the engine can continue, so
the process instance state changes. For UNAVAILABLE and
RESOURCE_EXHAUSTED, the broker will not accept further commands, so that
when we retry the SetVariables command, the process instance state will
stay the same.

## Related issues

closes #15549
github-merge-queue bot pushed a commit that referenced this issue May 7, 2024
…ESOURCE_EXHAUSTED (#18301)

# Description
Backport of #18180 to `stable/8.4`.

relates to #15549
original author: @berkaycanbc
github-merge-queue bot pushed a commit that referenced this issue May 7, 2024
…ESOURCE_EXHAUSTED (#18302)

# Description
Backport of #18180 to `stable/8.5`.

relates to #15549
original author: @berkaycanbc
@Zelldon Zelldon added version:8.4.7 Marks an issue as being completely or in parts released in 8.4.7 version:8.5.1 Marks an issue as being completely or in parts released in 8.5.1 labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/clients component/zeebe Related to the Zeebe component/team kind/bug Categorizes an issue or PR as a bug severity/mid Marks a bug as having a noticeable impact but with a known workaround version:8.4.7 Marks an issue as being completely or in parts released in 8.4.7 version:8.5.1 Marks an issue as being completely or in parts released in 8.5.1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants