aboutsummaryrefslogtreecommitdiff
path: root/src/table
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Many improvements on ring/replication and its configuration:Alex Auvolat2021-05-283-3/+52
| | | | | | | | | | | | | | | | | | | | - Explicit "replication_mode" configuration parameters that takes either "none", "2" or "3" as values, instead of letting user configure replication factor themselves. These are presets whose corresponding replication/quorum values can be found in replication/mode.rs - Explicit support for single-node and two-node deployments (number of nodes must be at least "replication_mode", with "none" we can have only one node) - Ring is now stored much more compactly with 256*8 + n*32 bytes, instead of 256*32 bytes - Support for gateway-only nodes that do not store data (these nodes still need a metadata_directory to store the list of bucket and keys since those are stored on all nodes; it also technically needs a data_directory to start but it will stay empty unless we have bugs)
* rename types to CamelCaseTrinity Pointard2021-05-0314-96/+96
|
* fix clippy warnings on tableTrinity Pointard2021-05-0310-43/+63
|
* change some more comments and revert changes on TableSchemaTrinity Pointard2021-04-271-1/+1
|
* make most requested changesTrinity Pointard2021-04-273-4/+2
|
* attempt at documenting table crateTrinity Pointard2021-04-279-26/+50
|
* Improve bootstraping: do it regularly; persist peer listAlex Auvolat2021-04-273-8/+30
|
* update to v0.2.1v0.2.1release-v0.2.1Alex Auvolat2021-03-191-3/+3
|
* Update Cargo.toml files with AGPL license infov0.2.0Alex Auvolat2021-03-181-4/+4
|
* Prepare for release 0.2Alex Auvolat2021-03-181-3/+3
|