Skip to content

Conversation

@mgoldenberg
Copy link
Contributor

@mgoldenberg mgoldenberg commented Sep 16, 2025

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, #5406, #5414, #5497, #5506, #5540, #5574, #5603). This particular pull request cleans up duplicated code and various warnings introduced during the EventCacheStore-MediaStore split (see #5568).

Changes

Deduplication

The primary changes are de-duplicating the transaction and serializer modules in event_cache_store and media_store. This additionally required some renaming of existing types in order to make sure that there were no clashes with existing top-level types.

Warnings introduced by split

Additionally, many warnings were previously being suppressed, as the event_cache_store module was under active development and not yet exposed publicly. Warning suppression was removed in #5568, but the warnings were not addressed. So, many of the changes deal with addressing warnings or suppressing them where development is still active.

Warnings not introduced by split

Finally, there was an unrelated warning in the crypto_store module introduced in #5537, which complained about the use of a feature that did not exist in the crate - namely, experimental-encrypted-state-events which was used in the cryptostore_integration_tests. This was addressed in the same way that it was addressed in matrix-sdk-sqlite - i.e., by introducing a feature flag in the crate.

Future Work

  • Add implementation of remaining functions in MediaStore
  • Refactor feature flags
    • The current feature flags are a bit convoluted and could be simplified and made more modular

  • Public API changes documented in changelogs (optional)

Signed-off-by: Michael Goldenberg [email protected]

… to IndexedTypeSerializer{Error}

Signed-off-by: Michael Goldenberg <[email protected]>
…ndexedTypeSerializer{Error}

Signed-off-by: Michael Goldenberg <[email protected]>
…ache store migrations

Signed-off-by: Michael Goldenberg <[email protected]>
…till under development

Signed-off-by: Michael Goldenberg <[email protected]>
…il it is publicly exposed

Signed-off-by: Michael Goldenberg <[email protected]>
…serializer modules while media store under development

Signed-off-by: Michael Goldenberg <[email protected]>
…uiet warning about using non-existent features in crypto store

Signed-off-by: Michael Goldenberg <[email protected]>
@codspeed-hq
Copy link

codspeed-hq bot commented Sep 16, 2025

CodSpeed Performance Report

Merging #5676 will not alter performance

Comparing mgoldenberg:clean-up-indexeddb-stores (3907724) with main (6818634)

Summary

✅ 49 untouched

@codecov
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.40%. Comparing base (8c6922d) to head (3907724).
⚠️ Report is 28 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5676   +/-   ##
=======================================
  Coverage   88.40%   88.40%           
=======================================
  Files         355      355           
  Lines       97713    97713           
  Branches    97713    97713           
=======================================
  Hits        86383    86383           
  Misses       7262     7262           
  Partials     4068     4068           

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

…n feature is not enabled

Signed-off-by: Michael Goldenberg <[email protected]>
…raits are only available when they are needed

Signed-off-by: Michael Goldenberg <[email protected]>
@mgoldenberg mgoldenberg marked this pull request as ready for review September 16, 2025 16:35
@mgoldenberg mgoldenberg requested a review from a team as a code owner September 16, 2025 16:35
@mgoldenberg mgoldenberg removed the request for review from a team September 16, 2025 16:35
@mgoldenberg mgoldenberg requested a review from bnjbvr September 16, 2025 16:35
@Hywan Hywan requested review from Hywan and removed request for bnjbvr September 17, 2025 07:58
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.

It seems to be mostly code move. Thanks for the cleanup, that's a nice improvement! Thank you for the efforts!

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