Skip to content

IndexedDB: Add IndexedDB implementation of LinkedChunk-related functions in EventCacheStore #5406

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

Conversation

mgoldenberg
Copy link
Contributor

Background

This pull request is part of a series of pull requests to add a full IndexedDB implementation of the EventCacheStore (see #4617, #4996, #5090, #5138, #5226, #5274, #5343, #5384). This particular pull request focuses on providing implementations for the remaining LinkedChunk-related functions in EventCacheStore.

Changes

The changes include implementations of the following functions, as well as tests for each of them.

  • EventCacheStore::load_all_chunks_metadata
  • EventCacheStore::load_previous_chunk
  • EventCacheStore::clear_all_linked_chunks

There are also two additions to IndexeddbEventCacheStoreTransaction which support the implementation of the EventCacheStore::load_all_chunks_metadata.

  • get_events_count_by_position
  • get_events_count_by_chunk

Future Work

  • Add remaining implementations of EventCacheStore functions without relying on MemoryStore

  • Public API changes documented in changelogs (optional)

Signed-off-by: Michael Goldenberg m@mgoldenberg.net

…previous_chunk

Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
…_all_linked_chunks

Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
…all_chunks_metadata

Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Copy link

codecov bot commented Jul 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.81%. Comparing base (679aa07) to head (215d3c8).
Report is 12 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5406      +/-   ##
==========================================
- Coverage   88.81%   88.81%   -0.01%     
==========================================
  Files         334      334              
  Lines       91256    91256              
  Branches    91256    91256              
==========================================
- Hits        81051    81048       -3     
- Misses       6391     6394       +3     
  Partials     3814     3814              

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

@mgoldenberg mgoldenberg marked this pull request as ready for review July 15, 2025 03:57
@mgoldenberg mgoldenberg requested a review from a team as a code owner July 15, 2025 03:57
@mgoldenberg mgoldenberg requested review from andybalaam and removed request for a team July 15, 2025 03:57
@Hywan Hywan requested review from Hywan and removed request for andybalaam July 15, 2025 06:41
Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Excellent! I left a feedback regarding a query made in a loop. Otherwise, it's good! Thanks.

…easy performance tracking

Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
@Hywan Hywan merged commit 471e3c3 into matrix-org:main Jul 15, 2025
44 checks passed
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