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

[v23.2.x] Txn sessions thrashing: expire all old txs instead of one at a time #13746

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #13658

Refactor do_expire_old_tx to give more control to limit_init_tm_tx
over error handling.

(cherry picked from commit 1a17042)
When fetch_tx fails get_tx may remove a txn session and return
tx_not_found; limit_init_tm_tx shouldn't propagate the error to
the client because the method's intenion is the same (to remove
oldest txn session when the txn cache is beyond its capacity).

(cherry picked from commit 97b27f6)
Expiring one old txn sesison per new tx helps to maintain the txn
sessions cache size at the capacity but it won't bring the cache
size down if it's already beyond max_transactions_per_coordinator
(it may happen when a user sets max_transactions_per_coordinator
for the first time).

Fixing it by bulk expiring.

(cherry picked from commit 397e3c8)
Cleaning tx session cache blocks `init_producer_id` request until the
size of the cache falls below the threshold. This commit makes it less
disruptive by allowing `init_producer_id` to procced if its tx id is
already in the cache so processing it doesn't make the situation worse.

(cherry picked from commit 3d51861)
@vbotbuildovich vbotbuildovich added this to the v23.2.x-next milestone Sep 27, 2023
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Sep 27, 2023
@rystsov rystsov marked this pull request as ready for review September 27, 2023 23:46
@piyushredpanda piyushredpanda modified the milestones: v23.2.x-next, v23.2.10 Sep 27, 2023
@piyushredpanda piyushredpanda merged commit 6d89baf into redpanda-data:v23.2.x Sep 28, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants