aboutsummaryrefslogtreecommitdiff
path: root/src/table
Commit message (Collapse)AuthorAgeFilesLines
* [rel-0.8.6] Bump version to v0.8.6v0.8.6rel-0.8.6Alex Auvolat2024-03-011-1/+1
|
* Bump version to 0.8.5Alex Auvolat2024-01-161-1/+1
|
* update version to 0.8.4v0.8.4hold-netapp-0.5.2Alex Auvolat2023-09-051-1/+1
|
* bump version to 0.8.3v0.8.3-rc1Alex Auvolat2023-08-281-1/+1
|
* *: apply clippy recommendations.Jonathan Davies2023-05-092-15/+10
|
* Declare garage crates using workspace.dependenciesJakub Jirutka2023-05-091-3/+3
| | | | | | | | This will allow to really disable "sled" feature without declaring `default-features = false` in every Cargo.toml where garage_db and garage_model is used. See https://doc.rust-lang.org/cargo/reference/workspaces.html#the-dependencies-table
* Prepare for v0.8.2Alex Auvolat2023-03-131-4/+4
|
* Merge branch 'main' into k2v-watch-range-2Alex Auvolat2023-01-261-1/+1
|\
| * Cargo.toml: Loosen tracing dependency to just 0.1.Jonathan Davies2023-01-261-1/+1
| |
* | Make K2V item timestamps globally increasing on each nodeAlex Auvolat2023-01-101-10/+14
|/
* cargo fmtAlex Auvolat2023-01-031-1/+1
|
* move debug_serialize to garage_util::encodeAlex Auvolat2023-01-031-1/+1
|
* Make it explicit when using nonversioned encodingAlex Auvolat2023-01-033-5/+6
|
* cleanupAlex Auvolat2023-01-038-89/+29
|
* Refactor how things are migratedAlex Auvolat2023-01-034-31/+35
|
* Merge branch 'main' into internals-reworkinternals-reworkAlex Auvolat2023-01-021-4/+4
|\
| * Bump everything to v0.8.1Alex Auvolat2023-01-021-4/+4
| |
* | factorizeAlex Auvolat2022-12-141-5/+4
| |
* | Get rid of background::spawnAlex Auvolat2022-12-141-5/+10
| |
* | Simplified and more aggressive worker exit logicAlex Auvolat2022-12-144-16/+4
| |
* | Add missing notifyAlex Auvolat2022-12-141-0/+1
| |
* | Refactor background runner and get rid of job workerAlex Auvolat2022-12-143-17/+12
| |
* | Spawn all background workers in a separate stepAlex Auvolat2022-12-145-37/+54
| |
* | Proper queueing for delayed inserts, now backed to diskAlex Auvolat2022-12-145-5/+142
| |
* | Small refactor of tables internalsAlex Auvolat2022-12-141-18/+22
|/
* Add block.rc_size, table.size and table.merkle_tree_size metricsAlex Auvolat2022-12-132-2/+44
|
* cli: prettier table in garage statsAlex Auvolat2022-12-131-0/+4
|
* Implement `block list-errors` and `block info`Alex Auvolat2022-12-131-0/+6
|
* Prettier worker list table; remove useless CLI log messagesAlex Auvolat2022-12-123-19/+13
|
* Refactor health check and add ability to return it in jsonAlex Auvolat2022-12-052-59/+0
|
* Implement /health admin API endpoint to check node healthAlex Auvolat2022-12-051-0/+1
|
* Fix instant substractions that might have panickedfix-timeAlex Auvolat2022-09-291-1/+1
|
* Merge branch 'main' into configurable-timeoutsAlex Auvolat2022-09-202-2/+3
|\
| * Change a warn! into a debug!less-noiseAlex Auvolat2022-09-202-2/+3
| |
* | RPC performance changesAlex Auvolat2022-09-193-31/+9
|/ | | | | | - configurable ping timeout - single, much higher, configurable RPC timeout - no more concurrency semaphore
* Remove/change println! in server code (fix #358)Alex Auvolat2022-09-131-1/+0
|
* Merge branch 'lx-perf-improvements' into netapp-stream-bodyAlex Auvolat2022-09-081-3/+3
|\
| * Bump versions to 0.8.0 (compatibility is broken already)Alex Auvolat2022-09-061-3/+3
| |
* | Less strict timeoutsAlex Auvolat2022-09-013-3/+5
| |
* | First adaptation to WIP netapp with streaming bodyAlex Auvolat2022-07-291-1/+1
|/
* Background task manager (#332)Alex2022-07-083-166/+208
| | | | | | | | | | | | | | | | | | | | | - [x] New background worker trait - [x] Adapt all current workers to use new API - [x] Command to list currently running workers, and whether they are active, idle, or dead - [x] Error reporting - Optimizations - [x] Merkle updater: several items per iteration - [ ] Use `tokio::task::spawn_blocking` where appropriate so that CPU-intensive tasks don't block other things going on - scrub: - [x] have only one worker with a channel to start/pause/cancel - [x] automatic scrub - [x] ability to view and change tranquility from CLI - [x] persistence of a few info - [ ] Testing Co-authored-by: Alex Auvolat <alex@adnab.me> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/332 Co-authored-by: Alex <alex@adnab.me> Co-committed-by: Alex <alex@adnab.me>
* Abstract database behind generic interface and implement alternative drivers ↵Alex2022-06-088-144/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#322) - [x] Design interface - [x] Implement Sled backend - [x] Re-implement the SledCountedTree hack ~~on Sled backend~~ on all backends (i.e. over the abstraction) - [x] Convert Garage code to use generic interface - [x] Proof-read converted Garage code - [ ] Test everything well - [x] Implement sqlite backend - [x] Implement LMDB backend - [ ] (Implement Persy backend?) - [ ] (Implement other backends? (like RocksDB, ...)) - [x] Implement backend choice in config file and garage server module - [x] Add CLI for converting between DB formats - Exploit the new interface to put more things in transactions - [x] `.updated()` trigger on Garage tables Fix #284 **Bugs** - [x] When exporting sqlite, trees iterate empty?? - [x] LMDB doesn't work **Known issues for various back-ends** - Sled: - Eats all my RAM and also all my disk space - `.len()` has to traverse the whole table - Is actually quite slow on some operations - And is actually pretty bad code... - Sqlite: - Requires a lock to be taken on all operations. The lock is also taken when iterating on a table with `.iter()`, and the lock isn't released until the iterator is dropped. This means that we must be VERY carefull to not do anything else inside a `.iter()` loop or else we will have a deadlock! Most such cases have been eliminated from the Garage codebase, but there might still be some that remain. If your Garage-over-Sqlite seems to hang/freeze, this is the reason. - (adapter uses a bunch of unsafe code) - Heed (LMDB): - Not suited for 32-bit machines as it has to map the whole DB in memory. - (adpater uses a tiny bit of unsafe code) **My recommendation:** avoid 32-bit machines and use LMDB as much as possible. **Converting databases** is actually quite easy. For example from Sled to LMDB: ```bash cd src/db cargo run --features cli --bin convert -- -i path/to/garage/meta/db -a sled -o path/to/garage/meta/db.lmdb -b lmdb ``` Then, just add this to your `config.toml`: ```toml db_engine = "lmdb" ``` Co-authored-by: Alex Auvolat <alex@adnab.me> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/322 Co-authored-by: Alex <alex@adnab.me> Co-committed-by: Alex <alex@adnab.me>
* First implementation of K2V (#293)Alex2022-05-104-58/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **Specification:** View spec at [this URL](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/k2v/doc/drafts/k2v-spec.md) - [x] Specify the structure of K2V triples - [x] Specify the DVVS format used for causality detection - [x] Specify the K2V index (just a counter of number of values per partition key) - [x] Specify single-item endpoints: ReadItem, InsertItem, DeleteItem - [x] Specify index endpoint: ReadIndex - [x] Specify multi-item endpoints: InsertBatch, ReadBatch, DeleteBatch - [x] Move to JSON objects instead of tuples - [x] Specify endpoints for polling for updates on single values (PollItem) **Implementation:** - [x] Table for K2V items, causal contexts - [x] Indexing mechanism and table for K2V index - [x] Make API handlers a bit more generic - [x] K2V API endpoint - [x] K2V API router - [x] ReadItem - [x] InsertItem - [x] DeleteItem - [x] PollItem - [x] ReadIndex - [x] InsertBatch - [x] ReadBatch - [x] DeleteBatch **Testing:** - [x] Just a simple Python script that does some requests to check visually that things are going right (does not contain parsing of results or assertions on returned values) - [x] Actual tests: - [x] Adapt testing framework - [x] Simple test with InsertItem + ReadItem - [x] Test with several Insert/Read/DeleteItem + ReadIndex - [x] Test all combinations of return formats for ReadItem - [x] Test with ReadBatch, InsertBatch, DeleteBatch - [x] Test with PollItem - [x] Test error codes - [ ] Fix most broken stuff - [x] test PollItem broken randomly - [x] when invalid causality tokens are given, errors should be 4xx not 5xx **Improvements:** - [x] Descending range queries - [x] Specify - [x] Implement - [x] Add test - [x] Batch updates to index counter - [x] Put K2V behind `k2v` feature flag Co-authored-by: Alex Auvolat <alex@adnab.me> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/293 Co-authored-by: Alex <alex@adnab.me> Co-committed-by: Alex <alex@adnab.me>
* New replication modes and their documentationfeature/documentationAlex Auvolat2022-03-281-4/+13
|
* Add wrapper over sled tree to count items (used for big queues)Alex Auvolat2022-03-143-4/+13
|
* Bump version to 0.7 because of incompatible NetappAlex Auvolat2022-03-141-3/+3
|
* Add spans to table calls, change span names in RPCAlex Auvolat2022-03-141-2/+37
|
* Add metrics to API endpointAlex Auvolat2022-03-141-2/+4
|
* Refactor how durations are measuredAlex Auvolat2022-03-141-28/+34
|
* Add tracing integration with opentelemetryAlex Auvolat2022-03-144-4/+2
|