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

Add specific error codes for logstream write failure #12910

Merged
merged 7 commits into from
Jun 1, 2023

Conversation

deepthidevaki
Copy link
Contributor

@deepthidevaki deepthidevaki commented May 31, 2023

Description

LogstreamWriter#tryWrite returns specific error codes. If the sequencer is full, then the CommandApi can return a partition-leader-mismatch error code so that the gateway can retry the request. Other errors are mapped to internal error and logged at debug level.

Related issues

closes #12780

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/1.3) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • If the PR changes how BPMN processes are validated (e.g. support new BPMN element) then the Camunda modeling team should be informed to adjust the BPMN linting.

Other teams:
If the change impacts another team an issue has been created for this team, explaining what they need to do to support this change.

Please refer to our review guidelines.

@deepthidevaki deepthidevaki changed the title Add specific error coded for logstream write failure Add specific error codes for logstream write failure May 31, 2023
@deepthidevaki deepthidevaki marked this pull request as ready for review May 31, 2023 10:52
Copy link
Member

@lenaschoenburg lenaschoenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks @deepthidevaki, I think it's a good idea to return an Either from the Sequencer.

I've left some optional remarks, nothing else.

@deepthidevaki
Copy link
Contributor Author

@oleschoenburg I have applied your comments.

@deepthidevaki
Copy link
Contributor Author

bors merge

@zeebe-bors-camunda
Copy link
Contributor

Build succeeded:

@zeebe-bors-camunda zeebe-bors-camunda bot merged commit d2a12c0 into main Jun 1, 2023
31 checks passed
@zeebe-bors-camunda zeebe-bors-camunda bot deleted the dd-12780-error-log branch June 1, 2023 07:14
@backport-action
Copy link
Collaborator

Backport failed for stable/8.2, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin stable/8.2
git worktree add -d .worktree/backport-12910-to-stable/8.2 origin/stable/8.2
cd .worktree/backport-12910-to-stable/8.2
git checkout -b backport-12910-to-stable/8.2
ancref=$(git merge-base 7c31e9ea6596e7f6da16aada6139be536056997a 0ca6cd55d35a3ad7c958da3fc5ffea4977ad3b80)
git cherry-pick -x $ancref..0ca6cd55d35a3ad7c958da3fc5ffea4977ad3b80

zeebe-bors-camunda bot added a commit that referenced this pull request Jun 1, 2023
12928: [Backport stable/8.2] Add specific error codes for logstream write failure r=oleschoenburg a=deepthidevaki

Backport #12910 

closes #12780 

Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
@lenaschoenburg lenaschoenburg added the version:8.2.6 Marks an issue as being completely or in parts released in 8.2.6 label Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable/8.2 Backport a pull request to 8.2.x version:8.2.6 Marks an issue as being completely or in parts released in 8.2.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing to write to logstream during stepdown is logged as error
3 participants