Skip to content

fix: clear repeatable read transaction before running access tasks (#24400) (CP: 25.1)#24426

Merged
vaadin-bot merged 1 commit into
25.1from
cherry-pick-24400-to-25.1-1779460166415
May 22, 2026
Merged

fix: clear repeatable read transaction before running access tasks (#24400) (CP: 25.1)#24426
vaadin-bot merged 1 commit into
25.1from
cherry-pick-24400-to-25.1-1779460166415

Conversation

@vaadin-bot
Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #24400 to branch 25.1.

Original PR description

Summary

  • Clear the session-scoped transaction before running pending access tasks during session unlock
  • This ensures effects triggered by access tasks see fresh signal values instead of stale cached values from the repeatable read transaction
  • Added a unit test to verify that clearing the transaction fallback allows fresh reads

Details

When a shared signal is updated concurrently with an ongoing UIDL request, effects associated with that UI would run with the repeatable read transaction used for the request. If the transaction cached the old value, effects would miss the update.

The fix moves sessionScopedTransaction = null to execute before runPendingAccessTasks() instead of after, ensuring access tasks read fresh values.

Test plan

  • Existing unit tests pass
  • New clearingFallback_allowsFreshReads test verifies the fix behavior
  • Manual test with the reproduction case from the issue

Fixes #24399

Slack thread: https://vaadin.slack.com/archives/C6RAXJATF/p1779368249043829?thread_ts=1779368185.339629&cid=C6RAXJATF

https://claude.ai/code/session_01QW3F8K4uxGyaUNa9xwoKTR


Generated by Claude Code

…24400)

## Summary

- Clear the session-scoped transaction **before** running pending access
tasks during session unlock
- This ensures effects triggered by access tasks see fresh signal values
instead of stale cached values from the repeatable read transaction
- Added a unit test to verify that clearing the transaction fallback
allows fresh reads

## Details

When a shared signal is updated concurrently with an ongoing UIDL
request, effects associated with that UI would run with the repeatable
read transaction used for the request. If the transaction cached the old
value, effects would miss the update.

The fix moves `sessionScopedTransaction = null` to execute before
`runPendingAccessTasks()` instead of after, ensuring access tasks read
fresh values.

## Test plan

- [ ] Existing unit tests pass
- [ ] New `clearingFallback_allowsFreshReads` test verifies the fix
behavior
- [ ] Manual test with the reproduction case from the issue

Fixes #24399

Slack thread:
https://vaadin.slack.com/archives/C6RAXJATF/p1779368249043829?thread_ts=1779368185.339629&cid=C6RAXJATF

https://claude.ai/code/session_01QW3F8K4uxGyaUNa9xwoKTR

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QW3F8K4uxGyaUNa9xwoKTR)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@vaadin-bot
Copy link
Copy Markdown
Collaborator Author

This PR is eligible for auto-merging policy, so it has been approved automatically. If there are pending conditions, auto merge (with 'squash' method) has been enabled for this PR [Message is sent from bot]

@vaadin-bot vaadin-bot enabled auto-merge (squash) May 22, 2026 14:39
@github-actions
Copy link
Copy Markdown

Test Results

 1 396 files  ±0   1 396 suites  ±0   1h 28m 13s ⏱️ + 2m 22s
10 047 tests +1   9 977 ✅ +1  70 💤 ±0  0 ❌ ±0 
10 522 runs  +1  10 443 ✅ +1  79 💤 ±0  0 ❌ ±0 

Results for commit 15b269e. ± Comparison against base commit 76d6a85.

@vaadin-bot vaadin-bot merged commit c9303ca into 25.1 May 22, 2026
31 checks passed
@vaadin-bot vaadin-bot deleted the cherry-pick-24400-to-25.1-1779460166415 branch May 22, 2026 14:49
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.

3 participants