Skip to content

feat(event cache store): add an IndexedDB implementation #4617

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

Closed

Conversation

ospfranco
Copy link

This PR is WIP.

This PR is meant to add a EventCache store for the the matrix-sdk-indexeddb crate of the SDK meant to be used in WASM contexts. Similar to the sqlite implementation is supposed to provide a disk persisted implementation for storing Events in LinkedChunks.

It follows the general structure of matrix-sdk-indexeddb/src/crypto_store and matrix-sdk-indexeddb/src/state_store, a new module matrix-sdk-indexeddb/src/event_cache_store has been added.

There are still many TODOs and questions in the codebase to which I would appreciate some guidance from the SDK maintainers.

  • Public API changes documented in changelogs (optional)

Signed-off-by: Oscar Franco

migration_conflict_strategy: MigrationConflictStrategy,
}

impl IndexeddbEventCacheStoreBuilder {
Copy link
Author

Choose a reason for hiding this comment

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

Follows the same pattern as state_store, not sure if this is wanted or not.

};

// let store_config = {
Copy link
Author

Choose a reason for hiding this comment

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

Will be removed later

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.73%. Comparing base (3f71d9a) to head (d390e07).
Report is 721 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4617      +/-   ##
==========================================
+ Coverage   85.71%   85.73%   +0.01%     
==========================================
  Files         291      291              
  Lines       33323    33322       -1     
==========================================
+ Hits        28563    28568       +5     
+ Misses       4760     4754       -6     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Hywan
Copy link
Member

Hywan commented Feb 11, 2025

Be aware that #4632 is likely to create a non-negligible conflict with your patches. The new methods to load chunk from the event cache are going to be simpler and will allow to incrementally load the chunks.

@toger5 toger5 force-pushed the oscar/indexeddb-event-cache-store branch from db030c7 to ceac8ca Compare February 28, 2025 08:41
@ospfranco ospfranco force-pushed the oscar/indexeddb-event-cache-store branch from ceac8ca to db030c7 Compare February 28, 2025 08:48
@ospfranco ospfranco closed this Apr 10, 2025
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.

3 participants