Abstract database behind generic interface and implement alternative drivers #322

Merged
lx merged 64 commits from db-abstraction into main 2022-06-08 08:01:56 +00:00

64 commits

Author SHA1 Message Date
e682478d75
Create meta directory in server (or else sqlite fails)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2022-06-07 19:11:11 +02:00
1e4814568b
remove useless clippy allow 2022-06-07 18:48:32 +02:00
0c0a02ad03
Remove useless function
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2022-06-07 18:36:13 +02:00
48928d2d70
Simplify sqlite
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2022-06-07 18:26:28 +02:00
cc4f1aca97
sqlite can actually tell us its version
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2022-06-07 18:22:27 +02:00
845c344231
Inform user of what DB engine Garage is running on
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2022-06-07 18:20:51 +02:00
d41a67c4ee
simplify & fix db tests
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2022-06-07 18:06:30 +02:00
daec7995c3
cargo fmt
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-07 17:56:29 +02:00
c103ca8bf2
Correct error type for (unimplemented) iterators in transactions
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-07 17:56:11 +02:00
0543cb3453
Cleaner error management (less error-prone api)
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-07 17:50:10 +02:00
1bbe0794f3
less pub(crate) 2022-06-07 17:23:17 +02:00
6f3d43b75b
prettier code 2022-06-07 17:21:01 +02:00
8c6f690fa5
less verbose code
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is passing
2022-06-07 17:14:16 +02:00
cdc03da0b8
make things more like before
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-06-07 17:11:55 +02:00
1d408d52b9
Simplify
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2022-06-07 17:10:22 +02:00
a3a01141ec
db abstraction: make .insert() and .remove() return the old value
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-06-07 17:05:17 +02:00
a9e79f848b
Bring back the counted tree hack for Sled (with caveat)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
caveat: it's not only for sled
2022-06-07 16:52:57 +02:00
5dbc79b77e
Try once again to fix sqlite bundling in nix
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2022-06-06 23:00:10 +02:00
3de9320a0e
bundled sqlite
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-06 22:35:46 +02:00
35544cac39
Add nix overrides to include lmdb and sqlite3 libraries
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2022-06-06 22:02:09 +02:00
e42c7bed38
Remove useless clones in sqlite
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-06 17:06:22 +02:00
1f9a371b9a
Fix clippy lint
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2022-06-06 17:01:49 +02:00
72a87c8686
Add inline marker on a bunch of db functions
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-06 16:51:00 +02:00
fd2fe18de3
in db convert: map size up to 1TB on 64-bit systems
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-06 16:44:47 +02:00
c3c8d59c99
Fix more .unwrap()'s
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-06 16:37:44 +02:00
bbf68aa039
fix
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-06 16:32:06 +02:00
72e6419b1b
add comment
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-06 16:31:43 +02:00
1dabd98330
Improve things in block manager & correctly propagate .len() errors
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-06 16:29:02 +02:00
9238fda9b2
Update Cargo.nix
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-06 16:13:13 +02:00
1897815358
Table updated trigger now happens in transaction, this is waaaay better!
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-06 15:46:00 +02:00
c56d858834
Fix clippy 2022-06-06 15:10:33 +02:00
a65049db8f
Simplify lmdb adapter (one less indirection)
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-06 15:07:37 +02:00
17918e2ef5
Whoops
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-06-06 14:09:17 +02:00
0ab21e780e
Small syntax changes
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2022-06-06 14:08:19 +02:00
a77efd7ca6
Safe choice: revert "Update rmp-serde"
This reverts commit 16e0a655d0.
2022-06-06 14:02:02 +02:00
7f2cf0b809
Safe choice: return Vec<u8> and not some fancy zero-copy type 2022-06-06 14:01:44 +02:00
4539a6c229
Fix more sqlite deadlocks
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2022-06-06 12:02:42 +02:00
4f5d17d464
fixes 2022-06-06 11:30:10 +02:00
2d5541b0e7
Integrate LMDB with rest
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-03 16:40:38 +02:00
f7a1c70089
Implement iterator for LMDB 2022-06-03 16:18:56 +02:00
bd2997a453
LMDB: use Heed wrapper (much more complete)
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-03 15:53:20 +02:00
4e72c713f1
Start LMDB adapter, with fixed semantics
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-03 15:31:07 +02:00
16e0a655d0
Update rmp-serde
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-03 14:16:30 +02:00
d3d7df098b
small fixes 2022-06-03 14:00:13 +02:00
3d18c9e183
whoops
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-03 13:35:02 +02:00
9bb58638f0
Fix block repair to not deadlock with sqlite 2022-06-03 12:56:35 +02:00
295bc2741f
fix clipy lint
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-03 12:52:41 +02:00
4bf706b170
Slightly prettier code 2022-06-03 12:35:12 +02:00
bd9ff432d7
Garage works on sqlite, but it's a hack
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-03 12:12:25 +02:00
df0877bbba
Conversion utility
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-03 11:44:41 +02:00
cc0d984118
Fix most clippy lints
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-03 11:14:24 +02:00
f25309e58f
Change value type to be a dyn thing
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-03 10:44:54 +02:00
7b79906350
Drop later 2022-06-03 04:44:40 +02:00
6ebb54cddb
Just refactor a bit
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-02 23:46:28 +02:00
0e4f336887
Horrible implementation of range for sqlite
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-02 23:43:32 +02:00
c439cb11a9
Sqlite iter with unsafe code
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-02 23:14:10 +02:00
364061453c
Add back Send 2022-06-02 22:05:57 +02:00
43704afb29
Begin sqlite adapter
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-02 19:58:47 +02:00
f29b91232f
Use Cell instead of ArcSwap
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-02 18:11:32 +02:00
fbd5b64ff3
Complete sled abstraction
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-02 17:38:30 +02:00
6805e184e9
Do not put sled in garage's cargo.toml
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
2022-06-02 17:01:04 +02:00
9f0f5b2e37
Adapt Garage to use new DB abstraction 2022-06-02 16:58:00 +02:00
04901093e7
Implement iter() and range() on db
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-02 15:25:24 +02:00
fd8d5c37f7
First iteration of a generic DB layer
Some checks failed
continuous-integration/drone/push Build is failing
2022-06-02 14:59:26 +02:00