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

rm_stm: do not hold producer lock for the duration of the barrier #17472

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

bharathv
Copy link
Contributor

The lock ensures that the concurrent idempotent requests do not reorder at the raft layer, i.e if one of the requests within a concurrent batch of dempotent requests fail to replicate, the subsequent ones fail too.

Upon hitting an OOOSN, we do not need to hold the lock as we are waiting for the barrier as we know for a fact that request that acquired this lock is of invalid sequence and does not affect the concurrently running requests. Holding the lock while the barrier returns just delays legit concurrent requests.

Backports Required

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

Release Notes

  • none

The lock ensures that the concurrent idempotent requests do not reorder
at the raft layer, i.e if one of the requests within a concurrent batch
of dempotent requests fail to replicate, the subsequent ones fail too.

Upon hitting an OOOSN, we do not need to hold the lock as we are waiting
for the barrier as we know for a fact that request that acquired this
lock is of invalid sequence and does not affect the concurrently running
requests. Holding the lock while the barrier returns just delays legit
concurrent requests.
@bharathv
Copy link
Contributor Author

I noticed this happening when debugging @nvartolomei 's write caching tests.

@piyushredpanda piyushredpanda merged commit 448f9c5 into redpanda-data:dev Apr 3, 2024
18 checks passed
@vbotbuildovich
Copy link
Collaborator

/backport v23.3.x

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.

4 participants