Skip to content

fix: do not hold server transactionStore lock during dial - #363

Open
zuercher wants to merge 1 commit into
emiago:mainfrom
sierra-inc:stephan/upstream-fix-server-tx-lock
Open

zuercher wants to merge 1 commit into
emiago:mainfrom
sierra-inc:stephan/upstream-fix-server-tx-lock

Conversation

@zuercher

@zuercher zuercher commented Sep 9, 2026

Copy link
Copy Markdown

When serverTxRequest triggers a dial, all other transactions were blocked until the dial completed (by a lock on the transactionStore). If the dial fails due to timeout or is otherwise slow, unrelated transactions can blocked long enough
to cause errors on those transactions.

Fix by using transactionStore's existing get/put and using a singleflight.Group to guarantee only a single transaction is created per key.

Add TestTransactionLayerServerTxCreationDoesNotBlockOtherTransactions which verifies that different transaction
keys are handled independently.

When serverTxRequest triggers a dial, all other transactions were
blocked until the dial completed (by a lock on the transactionStore).
If the dial fails due to timeout or is otherwise slow, unrelated
transactions are blocked.

Fix by using transactionStore's existing get/put and using
a singleflight.Group to guarantee only a single transaction is
created per key.

Add TestTransactionLayerServerTxCreationDoesNotBlockOtherTransactions
which verifies that different transaction keys are handled
independently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant