Drop the in-memory database #613
No reviewers
Labels
No labels
DB & Storage
Deployment
Error Handling & Logging
Maintenance
Payment Backend
backport
backport v0.13.x
backport v0.14.x
backport v0.15.x
bindings
blocked
bug
cdk-sql
ci
cli
deps
documentation
duplicate
enhancement
good first issue
help wanted
invalid
keep-open
ldk-node-ui
migrations
mint
mutation-testing
needs rebase
needs review
new nut
nut change
question
ready
rust-version
rustfmt
stacked hold
stale
testing
wallet
weekly-report
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cashubtc/cdk!613
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/in-memory-db-sqlite"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Fixes #607 (this PR depends on #620)
This PR drops the implementation of in-memory database traits.
They are useful for testing purposes since the tests should test our codebase and assume the database works as expected (although a follow-up PR should write a sanity test suite for all database trait implementors).
As complexity is worth with database requirements to simplify complexity and add more robustness, for instance, with the following plans to add support for transactions or buffered writes, it would become more complex and time-consuming to support a correct database trait. This PR drops the implementation and replaces it with a SQLite memory instance
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just final-checkbefore committingDo you think it makes sense to add a memory db feature? Or should we just keep it as you have to bring in one of the cdk-sqlite or redb crates. And whether the sqlite is in mem or not can be handled by that crate. The feature maybe is a little similar for the end user but it creates two para dimes to accomplish the same thing one enabling the feature one bringing in the create.
Related: https://github.com/cashubtc/cdk/issues/511
This PR has already undergone several iterations, but in its final version, which has just two functions per DB implementation, I believe that moving those functions from
cdkto the SQLite crate makes sense.Regarding #511, that does make sense.
Just a small question think there was a feature flag left in from a rebase? Other then that lgtm
I dont think we have this feature flag anymore?
@ -90,2 +90,4 @@#[instrument(skip(self))]pub async fn get_active_mint_keyset(&self) -> Result<KeySetInfo, Error> {// Importantlet _ = self.get_mint_info().await?;https://github.com/cashubtc/cdk/issues/621
ACK
bb46e85683