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

Return not leader for partition when shard is not found #8387

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

mmaslankaprv
Copy link
Member

@mmaslankaprv mmaslankaprv commented Jan 24, 2023

When moving partition the metadata may not reflect the actual replica placement as the actual data movement may take time. If partition metadata is correct but the partition not yet exists on a node we must return retryable error to the client. There is a possibility that during handling next client request partition will already be available on the node.

Changed error returned when partition shard wasn't found from UNKNOWN_TOPIC_OR_PARTITION which is not retryable to NOT_LEADER_FOR_PARTITION which forces producer to retry.

Fixes: #8290

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

  • fixed stopping producer when moving partitions

When moving partition the metadata may not reflect the actual replica
placement as the actual data movement may take time. If partition
metadata is correct but the partition not yet exists on a node we must
return retryable error to the client. There is a possibility that during
handling next client request partition will already be available on the
node.

Changed error returned when partition shard wasn't found from
`UNKNOWN_TOPIC_OR_PARTITION` which is not retryable to
`NOT_LEADER_FOR_PARTITION` which forces producer to retry.

Fixes: redpanda-data#8290

Signed-off-by: Michal Maslanka <michal@redpanda.com>
@mmaslankaprv mmaslankaprv merged commit 9fff7c8 into redpanda-data:dev Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants