aboutsummaryrefslogtreecommitdiff
path: root/src/block/manager.rs
Commit message (Collapse)AuthorAgeFilesLines
* table: take into account multiple write sets in insertsAlex Auvolat2023-11-141-4/+3
|
* layout: prepare for write setsAlex Auvolat2023-11-141-1/+2
|
* wip: split out layout management from System into separate LayoutManagerAlex Auvolat2023-11-091-5/+5
|
* block manager: remove data_dir fieldmultihddAlex Auvolat2023-09-111-3/+0
|
* block manager: fix bug where rebalance didn't delete old copiesAlex Auvolat2023-09-071-1/+38
|
* block manager: add rebalance operation to rebalance multi-hdd setupsAlex Auvolat2023-09-071-9/+13
|
* block manager: refactor and fix monitoring/statisticsAlex Auvolat2023-09-071-27/+20
|
* block manager: avoid incorrect data_dir configs and avoid losing filesAlex Auvolat2023-09-061-2/+6
|
* block manager: refactoring & increase max worker count to 8Alex Auvolat2023-09-061-13/+13
|
* block manager: refactoringAlex Auvolat2023-09-061-52/+44
|
* block manager: get rid of check_block_statusAlex Auvolat2023-09-061-49/+35
|
* block manager: move blocks in write_block if necessaryAlex Auvolat2023-09-061-12/+26
|
* block manager: use data paths from layoutAlex Auvolat2023-09-061-72/+75
|
* block manager: multi-directory layout computationAlex Auvolat2023-09-061-3/+7
|
* block manager: skeleton for multi-hdd supportAlex Auvolat2023-09-061-8/+21
|
* Make fsync an option for meta and dataAlex Auvolat2023-06-091-13/+22
|
* block/manager.rs: In is_block_compressed - check which compression_levelJonathan Davies2023-05-091-5/+25
| | | | | is configured on a node and check for raw block first if compression is disabled (to help reduce syscalls during a scrub).
* block/manager.rs: Set defaults for scrub_persister.Jonathan Davies2023-03-091-0/+1
|
* block/manager.rs: Display scrub-next-run.Jonathan Davies2023-03-061-0/+3
|
* block/metrics.rs: Added compression_level metric.Jonathan Davies2023-01-101-2/+6
|
* Merge pull request 'PutObject: better cleanup when request is interrupted in ↵Alex2023-01-041-4/+32
|\ | | | | | | | | | | the middle' (#462) from interrupted-cleanup into main Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/462
| * When saving block, delete .tmp file if we could not completeinterrupted-cleanupAlex Auvolat2023-01-031-4/+32
| |
* | Uniform framework for bg variable managementAlex Auvolat2023-01-041-2/+29
|/
* Refactor background runner and get rid of job workerAlex Auvolat2022-12-141-5/+4
|
* Spawn all background workers in a separate stepAlex Auvolat2022-12-141-12/+19
|
* Add block.rc_size, table.size and table.merkle_tree_size metricsAlex Auvolat2022-12-131-1/+2
|
* cli: prettier table in garage statsAlex Auvolat2022-12-131-0/+5
|
* Implement `block list-errors` and `block info`Alex Auvolat2022-12-131-0/+34
|
* RPC performance changesAlex Auvolat2022-09-191-9/+9
| | | | | | - configurable ping timeout - single, much higher, configurable RPC timeout - no more concurrency semaphore
* improvements in block managerAlex Auvolat2022-09-121-13/+16
|
* Merge branch 'lx-perf-improvements' into netapp-stream-bodyAlex Auvolat2022-09-061-514/+53
|\
| * Merge branch 'main' into lx-perf-improvementsAlex Auvolat2022-09-051-505/+57
| |\
| | * Ability to have up to 4 concurrently working resync workersAlex Auvolat2022-09-021-7/+5
| | |
| | * Make BlockManagerLocked fully private againAlex Auvolat2022-09-021-13/+22
| | |
| | * block manager: refactor: split resync into separate fileAlex Auvolat2022-09-021-550/+48
| | |
| | * Ability to dynamically set resync tranquilityAlex Auvolat2022-09-021-11/+51
| | |
* | | Reenable node orderingAlex Auvolat2022-09-061-6/+4
| | |
* | | Apply PRIO_SECONDARY to block data transfersAlex Auvolat2022-09-011-3/+3
| | |
* | | Less strict timeoutsAlex Auvolat2022-09-011-2/+6
| | |
* | | Update to Netapp with OrderTag support and exploit OrderTagsAlex Auvolat2022-09-011-16/+39
| | |
* | | Fix bytes_read counterAlex Auvolat2022-08-311-4/+9
| | |
* | | Factor out node request order selection logic & use in managerAlex Auvolat2022-07-291-0/+2
| | |
* | | Use streaming in block managerAlex Auvolat2022-07-291-55/+194
| | |
* | | First adaptation to WIP netapp with streaming bodyAlex Auvolat2022-07-291-10/+9
|/ /
* | Performance improvements:Alex Auvolat2022-07-291-12/+15
| | | | | | | | | | - reduce contention on mutation_lock by having 256 of them - better lmdb defaults
* | Compute hashes on dedicated threadsAlex Auvolat2022-07-291-2/+4
|/
* Background task manager (#332)Alex2022-07-081-211/+118
| | | | | | | | | | | | | | | | | | | | | - [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-081-35/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#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-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **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>
* Bring maximum exponential backoff time down from 16h to 1hAlex Auvolat2022-04-071-1/+5
|