input-output-hk / mithril

Stake-based threshold multi-signatures protocol
https://mithril.network
Apache License 2.0
130 stars 41 forks source link

Refactor event store to use migration mechanism #2043

Closed sfauvel closed 4 weeks ago

sfauvel commented 1 month ago

Content

This PR implement migration mechanism for the event_store module. The event_store module is reorganized to embedded a database folder with the same structure than the mithril-aggregator::database one. The WAL is activated on the event_store connection

Pre-submit checklist

Comments

We do not create a folder for repository, record and query but just a file because there is only one structure in each one. If we have to add other structure, we can create this directory later transparently for the other modules.

Issue(s)

Relates to #2023

github-actions[bot] commented 1 month ago

Test Results

    4 files  ±0     55 suites  ±0   10m 25s ⏱️ ±0s 1 397 tests +2  1 397 ✅ +2  0 💤 ±0  0 ❌ ±0  1 611 runs  +2  1 611 ✅ +2  0 💤 ±0  0 ❌ ±0 

Results for commit 9a7bf92e. ± Comparison against base commit 63e12046.

This pull request removes 3 and adds 5 tests. Note that renamed tests count towards both. ``` mithril-aggregator ‑ event_store::event::tests::can_persist_event mithril-aggregator ‑ event_store::event::tests::event_projection mithril-aggregator ‑ event_store::event::tests::provider_sql ``` ``` mithril-aggregator ‑ event_store::database::query::tests::build_a_json_for_content_field_with_content_and_headers mithril-aggregator ‑ event_store::database::query::tests::provider_sql mithril-aggregator ‑ event_store::database::record::tests::event_projection mithril-aggregator ‑ event_store::database::repository::tests::can_persist_event mithril-aggregator ‑ event_store::database::repository::tests::migration_executed_running_database ```

:recycle: This comment has been updated with latest results.