diff options
-rw-r--r-- | Cargo.lock | 37 | ||||
-rw-r--r-- | Cargo.nix | 64 | ||||
-rw-r--r-- | Cargo.toml | 10 | ||||
-rw-r--r-- | script/helm/garage/Chart.yaml | 2 | ||||
-rw-r--r-- | script/helm/garage/values.yaml | 36 | ||||
-rw-r--r-- | src/api/Cargo.toml | 10 | ||||
-rw-r--r-- | src/block/Cargo.toml | 8 | ||||
-rw-r--r-- | src/db/lmdb_adapter.rs | 2 | ||||
-rw-r--r-- | src/garage/Cargo.toml | 18 | ||||
-rw-r--r-- | src/k2v-client/Cargo.toml | 2 | ||||
-rw-r--r-- | src/model/Cargo.toml | 10 | ||||
-rw-r--r-- | src/rpc/Cargo.toml | 2 | ||||
-rw-r--r-- | src/table/Cargo.toml | 6 | ||||
-rw-r--r-- | src/util/Cargo.toml | 2 | ||||
-rw-r--r-- | src/web/Cargo.toml | 8 |
15 files changed, 79 insertions, 138 deletions
@@ -1758,15 +1758,6 @@ dependencies = [ ] [[package]] -name = "isolang" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64fd6448ee8a45ce6e4365c58e4fa7d8740cba2ed70db3e9ab4879ebd93eaaa" -dependencies = [ - "phf", -] - -[[package]] name = "itertools" version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2547,24 +2538,6 @@ dependencies = [ ] [[package]] -name = "phf" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] name = "pin-project" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3407,12 +3380,6 @@ dependencies = [ ] [[package]] -name = "siphasher" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" - -[[package]] name = "slab" version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3678,10 +3645,6 @@ name = "timeago" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5082dc942361cdfb74eab98bf995762d6015e5bb3a20bf7c5c71213778b4fcb4" -dependencies = [ - "chrono", - "isolang", -] [[package]] name = "tinyvec" @@ -32,7 +32,7 @@ args@{ ignoreLockHash, }: let - nixifiedLockHash = "e7f8df7901f8d217b438e374398eb3d4532e901770070ac5c8343624c0f45ca5"; + nixifiedLockHash = "fdd68f4fc55534ea423284de294a3da29395e7474a31bc0a8bd0527a2288719f"; workspaceSrc = if args.workspaceSrc == null then ./. else args.workspaceSrc; currentLockHash = builtins.hashFile "sha256" (workspaceSrc + /Cargo.lock); lockHashIgnored = if ignoreLockHash @@ -2450,20 +2450,6 @@ in }; }); - "registry+https://github.com/rust-lang/crates.io-index".isolang."2.2.0" = overridableMkRustCrate (profileName: rec { - name = "isolang"; - version = "2.2.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b64fd6448ee8a45ce6e4365c58e4fa7d8740cba2ed70db3e9ab4879ebd93eaaa"; }; - features = builtins.concatLists [ - [ "default" ] - [ "english_names" ] - ]; - dependencies = { - phf = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".phf."0.10.1" { inherit profileName; }).out; - }; - }); - "registry+https://github.com/rust-lang/crates.io-index".itertools."0.4.19" = overridableMkRustCrate (profileName: rec { name = "itertools"; version = "0.4.19"; @@ -3579,33 +3565,6 @@ in }; }); - "registry+https://github.com/rust-lang/crates.io-index".phf."0.10.1" = overridableMkRustCrate (profileName: rec { - name = "phf"; - version = "0.10.1"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"; }; - features = builtins.concatLists [ - [ "default" ] - [ "std" ] - ]; - dependencies = { - phf_shared = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".phf_shared."0.10.0" { inherit profileName; }).out; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".phf_shared."0.10.0" = overridableMkRustCrate (profileName: rec { - name = "phf_shared"; - version = "0.10.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"; }; - features = builtins.concatLists [ - [ "std" ] - ]; - dependencies = { - siphasher = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".siphasher."0.3.10" { inherit profileName; }).out; - }; - }); - "registry+https://github.com/rust-lang/crates.io-index".pin-project."1.0.12" = overridableMkRustCrate (profileName: rec { name = "pin-project"; version = "1.0.12"; @@ -4749,17 +4708,6 @@ in }; }); - "registry+https://github.com/rust-lang/crates.io-index".siphasher."0.3.10" = overridableMkRustCrate (profileName: rec { - name = "siphasher"; - version = "0.3.10"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"; }; - features = builtins.concatLists [ - [ "default" ] - [ "std" ] - ]; - }); - "registry+https://github.com/rust-lang/crates.io-index".slab."0.4.7" = overridableMkRustCrate (profileName: rec { name = "slab"; version = "0.4.7"; @@ -5100,16 +5048,6 @@ in version = "0.4.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "5082dc942361cdfb74eab98bf995762d6015e5bb3a20bf7c5c71213778b4fcb4"; }; - features = builtins.concatLists [ - [ "chrono" ] - [ "default" ] - [ "isolang" ] - [ "translations" ] - ]; - dependencies = { - chrono = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.23" { inherit profileName; }).out; - isolang = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".isolang."2.2.0" { inherit profileName; }).out; - }; }); "registry+https://github.com/rust-lang/crates.io-index".tinyvec."1.6.0" = overridableMkRustCrate (profileName: rec { @@ -15,6 +15,16 @@ members = [ default-members = ["src/garage"] +[workspace.dependencies] +garage_api = { version = "0.8.2", path = "src/api" } +garage_block = { version = "0.8.2", path = "src/block" } +garage_db = { version = "0.8.2", path = "src/db", default-features = false } +garage_model = { version = "0.8.2", path = "src/model", default-features = false } +garage_rpc = { version = "0.8.2", path = "src/rpc" } +garage_table = { version = "0.8.2", path = "src/table" } +garage_util = { version = "0.8.2", path = "src/util" } +garage_web = { version = "0.8.2", path = "src/web" } + [profile.dev] lto = "off" diff --git a/script/helm/garage/Chart.yaml b/script/helm/garage/Chart.yaml index 82b2e106..86f1239f 100644 --- a/script/helm/garage/Chart.yaml +++ b/script/helm/garage/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.0 +version: 0.4.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/script/helm/garage/values.yaml b/script/helm/garage/values.yaml index 3a1e41b9..02a6651b 100644 --- a/script/helm/garage/values.yaml +++ b/script/helm/garage/values.yaml @@ -4,9 +4,28 @@ # Garage configuration. These values go to garage.toml garage: + # Can be changed for better performance on certain systems + # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#db-engine-since-v0-8-0 + dbEngine: "sled" + + # Defaults is 1MB + # An increase can result in better performance in certain scenarios + # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#block-size + blockSize: "1048576" + + # Tuning parameters for the sled DB engine + # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#sled-cache-capacity + sledCacheCapacity: "134217728" + sledFlushEveryMs: "2000" + # Default to 3 replicas, see the replication_mode section at - # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/ + # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication-mode replicationMode: "3" + + # zstd compression level of stored blocks + # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#compression-level + compressionLevel: "1" + rpcBindAddr: "[::]:3901" # If not given, a random secret will be generated and stored in a Secret object rpcSecret: "" @@ -27,8 +46,19 @@ garage: metadata_dir = "/mnt/meta" data_dir = "/mnt/data" + db_engine = "{{ .Values.garage.dbEngine }}" + + block_size = {{ .Values.garage.blockSize }} + + {{- if eq .Values.garage.dbEngine "sled"}} + sled_cache_capacity = {{ .Values.garage.sledCacheCapacity }} + sled_flush_every_ms = {{ .Values.garage.sledFlushEveryMs }} + {{- end }} + replication_mode = "{{ .Values.garage.replicationMode }}" + compression_level = {{ .Values.garage.compressionLevel }} + rpc_bind_addr = "{{ .Values.garage.rpcBindAddr }}" # rpc_secret will be populated by the init container from a k8s secret object rpc_secret = "__RPC_SECRET_REPLACE__" @@ -49,7 +79,7 @@ garage: bind_addr = "[::]:3902" root_domain = "{{ .Values.garage.s3.web.rootDomain }}" index = "{{ .Values.garage.s3.web.index }}" - + [admin] api_bind_addr = "[::]:3903" {{- if .Values.monitoring.tracing.sink }} @@ -211,4 +241,4 @@ monitoring: scrapeTimeout: 10s relabelings: [] tracing: - sink: ""
\ No newline at end of file + sink: "" diff --git a/src/api/Cargo.toml b/src/api/Cargo.toml index 9babec02..747f70ab 100644 --- a/src/api/Cargo.toml +++ b/src/api/Cargo.toml @@ -14,11 +14,11 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_model = { version = "0.8.2", path = "../model" } -garage_table = { version = "0.8.2", path = "../table" } -garage_block = { version = "0.8.2", path = "../block" } -garage_util = { version = "0.8.2", path = "../util" } -garage_rpc = { version = "0.8.2", path = "../rpc" } +garage_model.workspace = true +garage_table.workspace = true +garage_block.workspace = true +garage_util.workspace = true +garage_rpc.workspace = true async-trait = "0.1.7" base64 = "0.21" diff --git a/src/block/Cargo.toml b/src/block/Cargo.toml index c6985754..3bf1c40a 100644 --- a/src/block/Cargo.toml +++ b/src/block/Cargo.toml @@ -14,10 +14,10 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_db = { version = "0.8.2", path = "../db" } -garage_rpc = { version = "0.8.2", path = "../rpc" } -garage_util = { version = "0.8.2", path = "../util" } -garage_table = { version = "0.8.2", path = "../table" } +garage_db.workspace = true +garage_rpc.workspace = true +garage_util.workspace = true +garage_table.workspace = true opentelemetry = "0.17" diff --git a/src/db/lmdb_adapter.rs b/src/db/lmdb_adapter.rs index 31956612..ecbc3b81 100644 --- a/src/db/lmdb_adapter.rs +++ b/src/db/lmdb_adapter.rs @@ -349,6 +349,6 @@ pub fn recommended_map_size() -> usize { #[cfg(target_pointer_width = "32")] pub fn recommended_map_size() -> usize { - warn!("LMDB is not recommended on 32-bit systems, database size will be limited"); + tracing::warn!("LMDB is not recommended on 32-bit systems, database size will be limited"); 1usize << 30 } diff --git a/src/garage/Cargo.toml b/src/garage/Cargo.toml index 0cbdf890..9935ce10 100644 --- a/src/garage/Cargo.toml +++ b/src/garage/Cargo.toml @@ -21,19 +21,19 @@ path = "tests/lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_db = { version = "0.8.2", path = "../db" } -garage_api = { version = "0.8.2", path = "../api" } -garage_block = { version = "0.8.2", path = "../block" } -garage_model = { version = "0.8.2", path = "../model" } -garage_rpc = { version = "0.8.2", path = "../rpc" } -garage_table = { version = "0.8.2", path = "../table" } -garage_util = { version = "0.8.2", path = "../util" } -garage_web = { version = "0.8.2", path = "../web" } +garage_db.workspace = true +garage_api.workspace = true +garage_block.workspace = true +garage_model.workspace = true +garage_rpc.workspace = true +garage_table.workspace = true +garage_util.workspace = true +garage_web.workspace = true backtrace = "0.3" bytes = "1.0" bytesize = "1.1" -timeago = "0.4" +timeago = { version = "0.4", default-features = false } parse_duration = "2.1" hex = "0.4" tracing = { version = "0.1" } diff --git a/src/k2v-client/Cargo.toml b/src/k2v-client/Cargo.toml index 52c16d89..27e85651 100644 --- a/src/k2v-client/Cargo.toml +++ b/src/k2v-client/Cargo.toml @@ -23,7 +23,7 @@ tokio = "1.24" # cli deps clap = { version = "4.1", optional = true, features = ["derive", "env"] } -garage_util = { version = "0.8.2", path = "../util", optional = true } +garage_util = { workspace = true, optional = true } [features] diff --git a/src/model/Cargo.toml b/src/model/Cargo.toml index 2b525a42..6dc954d4 100644 --- a/src/model/Cargo.toml +++ b/src/model/Cargo.toml @@ -14,11 +14,11 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_db = { version = "0.8.2", default-features = false, path = "../db" } -garage_rpc = { version = "0.8.2", path = "../rpc" } -garage_table = { version = "0.8.2", path = "../table" } -garage_block = { version = "0.8.2", path = "../block" } -garage_util = { version = "0.8.2", path = "../util" } +garage_db.workspace = true +garage_rpc.workspace = true +garage_table.workspace = true +garage_block.workspace = true +garage_util.workspace = true async-trait = "0.1.7" arc-swap = "1.0" diff --git a/src/rpc/Cargo.toml b/src/rpc/Cargo.toml index dcf44f4a..f0fde7a7 100644 --- a/src/rpc/Cargo.toml +++ b/src/rpc/Cargo.toml @@ -14,7 +14,7 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_util = { version = "0.8.2", path = "../util" } +garage_util.workspace = true arc-swap = "1.0" bytes = "1.0" diff --git a/src/table/Cargo.toml b/src/table/Cargo.toml index c794c924..d0776945 100644 --- a/src/table/Cargo.toml +++ b/src/table/Cargo.toml @@ -14,9 +14,9 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_db = { version = "0.8.2", path = "../db" } -garage_rpc = { version = "0.8.2", path = "../rpc" } -garage_util = { version = "0.8.2", path = "../util" } +garage_db.workspace = true +garage_rpc.workspace = true +garage_util.workspace = true opentelemetry = "0.17" diff --git a/src/util/Cargo.toml b/src/util/Cargo.toml index 2e6231f6..08fb5553 100644 --- a/src/util/Cargo.toml +++ b/src/util/Cargo.toml @@ -14,7 +14,7 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_db = { version = "0.8.2", path = "../db" } +garage_db.workspace = true arc-swap = "1.0" async-trait = "0.1" diff --git a/src/web/Cargo.toml b/src/web/Cargo.toml index d0a23af4..423d3829 100644 --- a/src/web/Cargo.toml +++ b/src/web/Cargo.toml @@ -14,10 +14,10 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_api = { version = "0.8.2", path = "../api" } -garage_model = { version = "0.8.2", path = "../model" } -garage_util = { version = "0.8.2", path = "../util" } -garage_table = { version = "0.8.2", path = "../table" } +garage_api.workspace = true +garage_model.workspace = true +garage_util.workspace = true +garage_table.workspace = true err-derive = "0.3" tracing = "0.1" |