Skip to content

Transaction observers are not impacted by Task Cancellation #1747

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

Merged
merged 2 commits into from
Mar 22, 2025

Conversation

groue
Copy link
Owner

@groue groue commented Mar 22, 2025

Since the release of GRBD 7, Task cancellation interrupts asynchronous database accesses.

This has created a problem with transaction observers. If a Task is cancelled after a transaction was successfully committed to disk, observers could fail processing the transaction. ValueObservation, in particular, could not fetch fresh values, and report an error:

  1. A task is started and performs an asynchronous write.
  2. The task is cancelled after the write was committed to disk, but before observations could handle the change.
  3. Observations attempts to fetch a fresh value, fail, and report an error (that's a bug).

This pull request restores the independence of transaction observers, and makes sure they can access the database even from a cancelled Task.

Thank you @tgrapperon for reporting this issue in #1746

@groue groue added the bug label Mar 22, 2025
@groue groue changed the base branch from master to development March 22, 2025 11:54
@groue groue merged commit 1ce8e38 into development Mar 22, 2025
13 of 16 checks passed
@groue groue deleted the dev/issue-1746 branch March 22, 2025 12:43
@groue
Copy link
Owner Author

groue commented Mar 22, 2025

Shipped in v7.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant