aboutsummaryrefslogtreecommitdiff
path: root/src/table
Commit message (Collapse)AuthorAgeFilesLines
...
| * 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
|
* Add many metrics in table/ and rpc/Alex Auvolat2022-03-144-8/+139
|
* Implement basic metrics in tableMaximilien R2022-03-144-0/+34
|
* Fix a bug when a migration is followed by a rebalanceAlex Auvolat2022-02-101-9/+18
| | | | | | | Nodes would stabilize on different encoding formats for the values, some having the pre-migration format and some having the post-migration format. This would be reflected in the Merkle trees never converging and thus having an infinite resync loop.
* Rename and change query filtersAlex Auvolat2022-01-041-2/+2
|
* Some movement of helper code and refactoring of error handlingAlex Auvolat2022-01-043-7/+4
|
* New buckets for 0.6.0: fix model and migrationAlex Auvolat2022-01-041-0/+3
|
* New model for bucketsAlex Auvolat2022-01-042-5/+5
|
* Make table name a const in traitAlex Auvolat2021-12-156-52/+57
|
* Improve how node roles are assigned in Garagev0.5-beta1Alex Auvolat2021-11-169-508/+10
| | | | | | | | | | | | | | | | | - change the terminology: the network configuration becomes the role table, the configuration of a nodes becomes a node's role - the modification of the role table takes place in two steps: first, changes are staged in a CRDT data structure. Then, once the user is happy with the changes, they can commit them all at once (or revert them). - update documentation - fix tests - implement smarter partition assignation algorithm This patch breaks the format of the network configuration: when migrating, the cluster will be in a state where no roles are assigned. All roles must be re-assigned and commited at once. This migration should not pose an issue.
* Implement GC delay for table dataAlex Auvolat2021-11-082-36/+74
|
* Refactor and comment table GC logicAlex Auvolat2021-11-082-23/+130
|
* Fix clippy lints (fix #121)Alex Auvolat2021-10-265-12/+12
|
* Improve CLI, adapt tests, update documentationAlex Auvolat2021-10-251-5/+1
|
* Improvements to CLI and various fixes for netapp versionAlex Auvolat2021-10-226-69/+48
| | | | Discovery via consul, persist peer list to file
* First port of Garage to NetappAlex Auvolat2021-10-228-137/+186
|
* Prepare for v0.3.0 and add migration path from v0.2.1.xv0.3.0Alex Auvolat2021-05-281-3/+3
|