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

admin: map replicated_entry_truncated error to 503 http error code #8494

Merged
merged 1 commit into from
Feb 2, 2023

Conversation

ZeDRoman
Copy link
Contributor

@ZeDRoman ZeDRoman commented Jan 30, 2023

When leader changed while request is replicating, entry can be truncated
We should map this error to 503 http error code

Fixes #8069

Backports Required

  • none - not a bug fix
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v22.3.x
  • v22.2.x
  • v22.1.x

UX Changes

Release Notes

Bug Fixes

  • map replicated_entry_truncated error to 503 http error code

@ZeDRoman ZeDRoman changed the title admin: catch replicated_entry_truncated error as 503 admin: map replicated_entry_truncated error to 503 http error code Jan 30, 2023
@ZeDRoman ZeDRoman marked this pull request as ready for review January 30, 2023 10:02
Copy link
Member

@dotnwat dotnwat left a comment

Choose a reason for hiding this comment

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

We should map this error to 503 http error code

please describe what the problem is (e.g. why was a test failing), and why this is the correct solution.

When leader changed while request is replicating, entry can be truncated
This is known raft situation when we get new leader while previous
is trying to replicate log
It should be classificated same as leadership_transfer_in_progress
We should map this error to 503 http error code
@ZeDRoman
Copy link
Contributor Author

We should map this error to 503 http error code

please describe what the problem is (e.g. why was a test failing), and why this is the correct solution.

I have added more detailed description in commit message.
Test failed because mapped this error to server_error_exception which is logged as ERROR

@ZeDRoman ZeDRoman requested a review from dotnwat January 31, 2023 19:30
@dotnwat
Copy link
Member

dotnwat commented Jan 31, 2023

Thanks for updating the commit message @ZeDRoman !

@bharathv bharathv merged commit 95d48f5 into redpanda-data:dev Feb 2, 2023
@ztlpn
Copy link
Contributor

ztlpn commented May 11, 2023

/backport v22.3.x

@vshtokman
Copy link
Contributor

@ztlpn , should this be backported to other branches as well?

1 similar comment
@vshtokman
Copy link
Contributor

@ztlpn , should this be backported to other branches as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI failure (replicated_entry_truncated) in PartitionBalancerTest.test_fuzz_admin_ops
5 participants