Fetching and then instantly reloading library loses data #256

Merged
wojtek merged 6 commits from 254---fetching-and-then-instantly-reloading-library-loses-data into main 2025-01-05 11:06:05 +01:00
Owner

Closes #254

Closes #254
wojtek added 1 commit 2025-01-04 23:26:09 +01:00
Code fix
All checks were successful
Cargo CI / Lint (pull_request) Successful in 1m7s
Cargo CI / Build and Test (pull_request) Successful in 2m6s
ce3571e393
Author
Owner

Still need some UT to test this.

Still need some UT to test this.
Author
Owner

Alternative solution is to ditch the cache and always reload the database when needed. Pro: closer to actual database behaviour. Con: if #64 is implemented then this will cause additional loads over the network (though only one per lib reload).

Alternative solution is to ditch the cache and always reload the database when needed. Pro: closer to actual database behaviour. Con: if #64 is implemented then this will cause additional loads over the network (though only one per lib reload).
Author
Owner

Next steps:

  1. UT this
  2. Think whether to leave this or get rid of cache.
Next steps: 1. UT this 2. Think whether to leave this or get rid of cache.
Author
Owner

Cache system:

  • Pro: reduces network traffic if DB is over the network
  • Con: extra work with every DB write

Load on demand:

  • Pro: no extra work with every DB write
  • Con: extra network traffic when reloading library

Reloading library is rare. Therefore, opt for load on demand.

Cache system: - Pro: reduces network traffic if DB is over the network - Con: extra work with every DB write Load on demand: - Pro: no extra work with every DB write - Con: extra network traffic when reloading library Reloading library is rare. Therefore, opt for load on demand.
wojtek added 3 commits 2025-01-05 10:45:50 +01:00
This reverts commit ce3571e393eeb869acdf541a1099d39524e286c1.
Make database loads explicit by the MH user
Some checks failed
Cargo CI / Build and Test (pull_request) Successful in 2m38s
Cargo CI / Lint (pull_request) Failing after 1m10s
180a2edd83
wojtek added 1 commit 2025-01-05 10:46:21 +01:00
Lint
All checks were successful
Cargo CI / Build and Test (pull_request) Successful in 2m2s
Cargo CI / Lint (pull_request) Successful in 1m7s
c842b1d98d
wojtek changed title from WIP: Fetching and then instantly reloading library loses data to Fetching and then instantly reloading library loses data 2025-01-05 10:48:07 +01:00
wojtek added 1 commit 2025-01-05 11:01:48 +01:00
Variable rename
All checks were successful
Cargo CI / Build and Test (pull_request) Successful in 2m7s
Cargo CI / Lint (pull_request) Successful in 1m7s
1bcd1ba1e1
wojtek merged commit ffd0d4d82f into main 2025-01-05 11:06:05 +01:00
wojtek deleted branch 254---fetching-and-then-instantly-reloading-library-loses-data 2025-01-05 11:06:05 +01:00
Sign in to join this conversation.
No description provided.