aboutsummaryrefslogtreecommitdiff
path: root/src/table/gc.rs
Commit message (Collapse)AuthorAgeFilesLines
* cleanupAlex Auvolat2023-01-031-26/+6
|
* Simplified and more aggressive worker exit logicAlex Auvolat2022-12-141-4/+1
|
* Refactor background runner and get rid of job workerAlex Auvolat2022-12-141-4/+2
|
* Spawn all background workers in a separate stepAlex Auvolat2022-12-141-5/+8
|
* Prettier worker list table; remove useless CLI log messagesAlex Auvolat2022-12-121-6/+4
|
* RPC performance changesAlex Auvolat2022-09-191-8/+2
| | | | | | - configurable ping timeout - single, much higher, configurable RPC timeout - no more concurrency semaphore
* Less strict timeoutsAlex Auvolat2022-09-011-1/+2
|
* Background task manager (#332)Alex2022-07-081-27/+62
| | | | | | | | | | | | | | | | | | | | | - [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-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#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>
* Add wrapper over sled tree to count items (used for big queues)Alex Auvolat2022-03-141-2/+3
|
* Some movement of helper code and refactoring of error handlingAlex Auvolat2022-01-041-1/+1
|
* Make table name a const in traitAlex Auvolat2021-12-151-6/+7
|
* Implement GC delay for table dataAlex Auvolat2021-11-081-35/+73
|
* Refactor and comment table GC logicAlex Auvolat2021-11-081-22/+128
|
* Improvements to CLI and various fixes for netapp versionAlex Auvolat2021-10-221-18/+11
| | | | Discovery via consul, persist peer list to file
* First port of Garage to NetappAlex Auvolat2021-10-221-38/+42
|
* rename types to CamelCaseTrinity Pointard2021-05-031-15/+15
|
* fix clippy warnings on tableTrinity Pointard2021-05-031-4/+4
|
* attempt at documenting table crateTrinity Pointard2021-04-271-1/+1
|
* Improve bootstraping: do it regularly; persist peer listAlex Auvolat2021-04-271-1/+6
|
* Small changesAlex Auvolat2021-03-161-5/+8
|
* some reorderingAlex Auvolat2021-03-161-3/+3
|
* Refactor codeAlex Auvolat2021-03-161-11/+11
|
* Simplify replication logicAlex Auvolat2021-03-161-1/+1
|
* WIP migrate to tokio 1Alex Auvolat2021-03-151-2/+2
|
* Refactor block resync loop; make workers infaillibleAlex Auvolat2021-03-151-2/+1
|
* Time and metadata improvementsAlex Auvolat2021-03-151-4/+6
|
* Optim & refactorAlex Auvolat2021-03-121-8/+11
|
* cargo fmtAlex Auvolat2021-03-121-20/+49
|
* Implement table gc, currently for block_ref and version onlyAlex Auvolat2021-03-121-0/+212