Skip to content

fix(BRIDGE-614): read onDiskLiteral in applyMessageUpdated before db transaction - #486

Merged
annatar merged 1 commit into
devfrom
fix/bridge-614
Aug 19, 2026
Merged

fix(BRIDGE-614): read onDiskLiteral in applyMessageUpdated before db transaction#486
annatar merged 1 commit into
devfrom
fix/bridge-614

Conversation

@annatar

@annatar annatar commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

If a panic happens in appy(), it doesn't block potential Wait/WaitContext listeners and applies updates.Done.

Concurrently get/set in a db transaction doesn't contest for the same lock - read the literals before the transaction.

@ElectroNafta

Copy link
Copy Markdown
Contributor

There's three separate things getting addressed here:

  1. The panic recovery
  2. Changing when some things get locked / or whether a lock is used
  3. Actions related to importing/moving/copying recovered messages

I'd split them off into their own MR's and commits. AFAIK this is the order of importance 2 -> 1 -> 3.

I only took a better look at part 2 thus far, and that one looks good and clear. But I'm not so sure about 3 in particular. Rarely touched, and based off of the evidence we have the deadlock shouldn't be related to that part in particular.

@annatar

annatar commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

There's three separate things getting addressed here:

1. The panic recovery

2. Changing when some things get locked / or whether a lock is used

3. Actions related to importing/moving/copying recovered messages

I'd split them off into their own MR's and commits. AFAIK this is the order of importance 2 -> 1 -> 3.

I only took a better look at part 2 thus far, and that one looks good and clear. But I'm not so sure about 3 in particular. Rarely touched, and based off of the evidence we have the deadlock shouldn't be related to that part in particular.

I will split them up and open them as separate prs. The importing/moving has the same codepath as 2, so they can be included in one. The panic recovery is its special thing

@annatar
annatar force-pushed the fix/bridge-614 branch 2 times, most recently from 73c5657 to 9af3dfe Compare August 14, 2026 13:02
@annatar annatar changed the title fix(BRIDGE-614): automatic panic recovery in apply & potential deadlock scenario with get/set in conccurent db transaction. fix(BRIDGE-614): read onDiskLiteral before db transaction Aug 14, 2026
@annatar annatar changed the title fix(BRIDGE-614): read onDiskLiteral before db transaction fix(BRIDGE-614): read onDiskLiteral in applyMessageUpdated before db transaction Aug 14, 2026
@annatar

annatar commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

@ElectroNafta split up the MR into a stack, each containing separate changes

Comment thread internal/backend/connector_updates.go Outdated
@annatar
annatar merged commit 9c58fcc into dev Aug 19, 2026
8 of 12 checks passed
@annatar
annatar deleted the fix/bridge-614 branch August 19, 2026 13:29
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.

2 participants