Skip to content

chore(sdk): reload_from_storage emits an EventsOrigin::Cache#6451

Open
Hywan wants to merge 1 commit intomatrix-org:mainfrom
Hywan:chore-sdk-event-cache-pinned-evnts-reload-from-storage-events-origin
Open

chore(sdk): reload_from_storage emits an EventsOrigin::Cache#6451
Hywan wants to merge 1 commit intomatrix-org:mainfrom
Hywan:chore-sdk-event-cache-pinned-evnts-reload-from-storage-events-origin

Conversation

@Hywan
Copy link
Copy Markdown
Member

@Hywan Hywan commented Apr 15, 2026

This patch updates
PinnedEventCacheStateLockWriteGuard::reload_from_storage. It calls notify_subscribers with EventsOrigin::Sync. This patch changes for EventsOrigin::Cache. All events are indeed loaded from the store, so the cache.


  • I've documented the public API Changes in the appropriate CHANGELOG.md files.
  • This PR was made with the help of AI.

This patch updates
`PinnedEventCacheStateLockWriteGuard::reload_from_storage`. It calls
`notify_subscribers` with `EventsOrigin::Sync`. This patch changes for
`EventsOrigin::Cache`. All events are indeed loaded from the store, so
the cache.
@Hywan Hywan requested a review from a team as a code owner April 15, 2026 10:15
@Hywan Hywan requested review from poljar and removed request for a team April 15, 2026 10:15
Copy link
Copy Markdown
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All events are indeed loaded from the store, so the cache.

So the cache!?!? The cache what? 😅

Is this fixing a bug? Do we want a regression tests for such a bug?

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.82%. Comparing base (dab87b7) to head (a212378).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6451      +/-   ##
==========================================
- Coverage   89.84%   89.82%   -0.03%     
==========================================
  Files         378      378              
  Lines      104337   104337              
  Branches   104337   104337              
==========================================
- Hits        93746    93723      -23     
- Misses       7000     7017      +17     
- Partials     3591     3597       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 15, 2026

Merging this PR will not alter performance

✅ 50 untouched benchmarks


Comparing Hywan:chore-sdk-event-cache-pinned-evnts-reload-from-storage-events-origin (a212378) with main (63f5be6)

Open in CodSpeed

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