aboutsummaryrefslogtreecommitdiff
path: root/src/model/garage.rs
Commit message (Collapse)AuthorAgeFilesLines
* [disable-scrub] implement a `disable_scrub` configuration optionAlex Auvolat2024-03-141-8/+1
|
* [factor-db-open] Combine logic for opening db enginesfactor-db-openAlex Auvolat2024-03-081-93/+19
|
* [lock-createbucket] Add node-global lock for bucket/key operations (fix #723)lock-createbucketAlex Auvolat2024-02-221-0/+9
|
* [import-netapp] import Netapp code into Garage codebaseAlex Auvolat2024-02-151-1/+1
|
* Merge branch 'main' into nextAlex Auvolat2023-09-111-2/+6
|\
| * config: make block_size and sled_cache_capacity expressable as stringsAlex Auvolat2023-09-111-12/+4
| |
| * make lmdb's map_size configurable (fix #628)Alex Auvolat2023-09-111-1/+13
| |
* | block manager: refactoringAlex Auvolat2023-09-061-1/+1
| |
* | block manager: skeleton for multi-hdd supportAlex Auvolat2023-09-061-2/+16
| |
* | lifecycle worker: launch with the rest of GarageAlex Auvolat2023-08-301-5/+21
| |
* | fix mpu counter (add missing workers) and report info at appropriate placesAlex Auvolat2023-06-091-0/+2
| |
* | New multipart upload table layoutAlex Auvolat2023-06-091-0/+22
| |
* | Make fsync an option for meta and dataAlex Auvolat2023-06-091-1/+14
| |
* | Mark sled as deprecated, make lmdb default, and improve sqlite and lmdb defaultsAlex Auvolat2023-05-171-1/+5
|/
* Clearer error message when LMDB has oom error (fix #517)Alex Auvolat2023-03-061-3/+10
|
* secrets can be passed directly in config, as file, or as envAlex Auvolat2023-02-031-9/+14
|
* More clippy fixesAlex Auvolat2023-01-261-1/+1
|
* Merge branch 'main' into k2v-watch-range-2Alex Auvolat2023-01-111-1/+1
|\
| * Implement `rpc_secret_file`Felix Scheinost2023-01-041-1/+1
| |
* | Make K2V item timestamps globally increasing on each nodeAlex Auvolat2023-01-101-1/+5
| |
* | K2V: Subscription to ranges of itemsAlex Auvolat2023-01-101-1/+1
|/
* Uniform framework for bg variable managementAlex Auvolat2023-01-041-0/+7
|
* Refactor background runner and get rid of job workerAlex Auvolat2022-12-141-20/+15
|
* Spawn all background workers in a separate stepAlex Auvolat2022-12-141-0/+21
|
* Refactor health check and add ability to return it in jsonAlex Auvolat2022-12-051-7/+2
|
* Implement /health admin API endpoint to check node healthAlex Auvolat2022-12-051-0/+4
|
* Add checks on replication_factor of layouts we use (fix #363, fix #364)various-fixes-for-0.8Alex Auvolat2022-09-131-1/+1
|
* Ensure data dir is created immediately when Garage starts (fix #349)Alex Auvolat2022-09-131-2/+7
|
* Merge branch 'main' into lx-perf-improvementsAlex Auvolat2022-09-081-2/+28
|\
| * Merge branch 'main' into improve-depsAlex Auvolat2022-09-071-1/+0
| |\
| * | Make all DB engines optional build featuresAlex Auvolat2022-09-061-2/+28
| | |
* | | Merge branch 'main' into lx-perf-improvementsAlex Auvolat2022-09-051-1/+0
|\ \ \ | | |/ | |/|
| * | Ability to dynamically set resync tranquilityAlex Auvolat2022-09-021-1/+0
| |/
* / Performance improvements:Alex Auvolat2022-07-291-5/+10
|/ | | | | - reduce contention on mutation_lock by having 256 of them - better lmdb defaults
* improve internal item counter mechanisms and implement bucket quotas (#326)Alex2022-06-151-9/+58
| | | | | | | | | | | | | | | | - [x] Refactoring of internal counting API - [x] Repair procedure for counters (it's an offline procedure!!!) - [x] New counter for objects in buckets - [x] Add quotas to buckets struct - [x] Add CLI to manage bucket quotas - [x] Add admin API to manage bucket quotas - [x] Apply quotas by adding checks on put operations - [x] Proof-read Co-authored-by: Alex Auvolat <alex@adnab.me> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/326 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-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#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 version of admin API (#298)Alex2022-05-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **Spec:** - [x] Start writing - [x] Specify all layout endpoints - [x] Specify all endpoints for operations on keys - [x] Specify all endpoints for operations on key/bucket permissions - [x] Specify all endpoints for operations on buckets - [x] Specify all endpoints for operations on bucket aliases View rendered spec at <https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/admin-api/doc/drafts/admin-api.md> **Code:** - [x] Refactor code for admin api to use common api code that was created for K2V **General endpoints:** - [x] Metrics - [x] GetClusterStatus - [x] ConnectClusterNodes - [x] GetClusterLayout - [x] UpdateClusterLayout - [x] ApplyClusterLayout - [x] RevertClusterLayout **Key-related endpoints:** - [x] ListKeys - [x] CreateKey - [x] ImportKey - [x] GetKeyInfo - [x] UpdateKey - [x] DeleteKey **Bucket-related endpoints:** - [x] ListBuckets - [x] CreateBucket - [x] GetBucketInfo - [x] DeleteBucket - [x] PutBucketWebsite - [x] DeleteBucketWebsite **Operations on key/bucket permissions:** - [x] BucketAllowKey - [x] BucketDenyKey **Operations on bucket aliases:** - [x] GlobalAliasBucket - [x] GlobalUnaliasBucket - [x] LocalAliasBucket - [x] LocalUnaliasBucket **And also:** - [x] Separate error type for the admin API (this PR includes a quite big refactoring of error handling) - [x] Add management of website access - [ ] Check that nothing is missing wrt what can be done using the CLI - [ ] Improve formatting of the spec - [x] Make sure everyone is cool with the API design Fix #231 Fix #295 Co-authored-by: Alex Auvolat <alex@adnab.me> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/298 Co-authored-by: Alex <alex@adnab.me> Co-committed-by: Alex <alex@adnab.me>
* First implementation of K2V (#293)Alex2022-05-101-20/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **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>
* ClippyAlex Auvolat2022-03-231-4/+3
|
* Make background tranquility a configurable parameterAlex Auvolat2022-03-231-6/+9
|
* Move DataBlock out of manager.rsAlex Auvolat2022-03-231-3/+0
|
* Move block manager to separate moduleAlex Auvolat2022-03-231-8/+5
|
* Some movement of helper code and refactoring of error handlingAlex Auvolat2022-01-041-3/+3
|
* New model for bucketsAlex Auvolat2022-01-041-0/+17
|
* Make table name a const in traitAlex Auvolat2021-12-151-17/+2
|
* Improve CLI, adapt tests, update documentationAlex Auvolat2021-10-251-6/+1
|
* Improvements to CLI and various fixes for netapp versionAlex Auvolat2021-10-221-0/+6
| | | | Discovery via consul, persist peer list to file
* First port of Garage to NetappAlex Auvolat2021-10-221-27/+16
|
* Many improvements on ring/replication and its configuration:Alex Auvolat2021-05-281-8/+13
| | | | | | | | | | | | | | | | | | | | - 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)
* fix clippy warnings on modelTrinity Pointard2021-05-031-5/+5
|