Commit Graph

552 Commits

Author SHA1 Message Date
Alex Auvolat
d9d199a6c9
Merge branch 'main' into lx-perf-improvements 2022-09-08 15:49:17 +02:00
Alex Auvolat
ceb1f0229a
Move version back into util 2022-09-07 18:36:46 +02:00
Alex Auvolat
f310fce34b
Inject GIT_VERSION even later 2022-09-07 18:30:15 +02:00
Alex Auvolat
06df301de5
Fix merge 2022-09-07 18:16:01 +02:00
Alex Auvolat
8adc654713
Merge branch 'main' into improve-deps 2022-09-07 18:13:27 +02:00
Alex Auvolat
107853334b
Fix build error 2022-09-07 18:10:19 +02:00
Alex Auvolat
1449204439
Add warnings when features are not included in build 2022-09-07 18:02:13 +02:00
Alex Auvolat
2e00809af5
Error messages when system-libs XOR bundled-libs != 1 2022-09-07 17:57:12 +02:00
Alex Auvolat
2559f63e9b
Make all HTTP services optionnal 2022-09-07 17:54:16 +02:00
Alex Auvolat
28d86e7602
Report build features in garage --help 2022-09-07 17:05:21 +02:00
Alex Auvolat
db61f41030
Move GIT_VERSION injection later in build chain to reduce build times 2022-09-07 11:59:56 +02:00
Alex Auvolat
6f02c36a89
cargo fmt 2022-09-06 17:59:41 +02:00
Alex Auvolat
0f5689c169
Include code from v0.5.1 directly to remove dependencies 2022-09-06 17:52:50 +02:00
Alex Auvolat
1e92e9f782
Disable k2v tests when feature is disabled 2022-09-06 17:29:46 +02:00
Alex Auvolat
431dee050f
Remove opentelemetry-otlp dep in api/ 2022-09-06 17:25:44 +02:00
Alex Auvolat
b886c75450
Make all DB engines optional build features 2022-09-06 17:09:43 +02:00
Alex Auvolat
48ffaaadfc
Bump versions to 0.8.0 (compatibility is broken already) 2022-09-06 16:47:56 +02:00
Alex Auvolat
454d8474ef
Fix clippy 2022-09-06 15:43:50 +02:00
Jakub Jirutka
ea36b9ff90 Allow building without Prometheus exporter (/metrics endpoint)
prometheus and opentelemetry-prometheus add 7 extra dependencies in
total and increases the size of the garage binary by ~7 % (with
fat LTO).
2022-09-06 01:15:09 +02:00
Jakub Jirutka
e7af006c1c Make OTLP exporter optional via feature "telemetry-otlp"
opentelemetry-otlp add 48 (!) extra dependencies and increases the
size of the garage binary by ~11 % (with fat LTO).
2022-09-06 01:14:47 +02:00
Alex Auvolat
729a910e14
Remove Heed default features 2022-09-05 16:40:13 +02:00
Alex Auvolat
07e6bcde85
Merge branch 'main' into lx-perf-improvements 2022-09-05 12:40:17 +02:00
Jakub Jirutka
7511ba5530 Allow linking against system-provided libsqlite
Unfortunately, rusqlite uses the opposite logic for enabling/disabling
bundled libraries to others (libsodium-sys, zstd-sys). Cargo features
are very limited and doesn't allow to enable feature A in a dependency
iff feature B is disabled.

Note, lmdb-rkv-sys doesn't need any special treatment because it
automatically links against system liblmdb if found via pkgconf.

Linux distros should build garage with
`--no-default-features --features system-libs` to disable bundled-libs
and enable system-libs.
2022-09-03 19:15:57 +02:00
Jakub Jirutka
a6e40b75ea Add feature "system-libs" to enable linking against system libraries
If this feature is enabled, libsodium-sys and zstd-sys will link
dynamically against system-provided libraries instead of building
and linking statically the bundled (possibly outdated and vulnerable)
copies of them. This feature is intended mainly for linux package
maintainers.
2022-09-03 18:44:34 +02:00
Alex Auvolat
e1751c8a9c
fix clippy 2022-09-02 17:24:26 +02:00
Alex Auvolat
5d4b937a00
Ability to have up to 4 concurrently working resync workers 2022-09-02 17:18:13 +02:00
Alex Auvolat
5e8baa433d
Make BlockManagerLocked fully private again 2022-09-02 16:52:22 +02:00
Alex Auvolat
47be652a1f
block manager: refactor: split resync into separate file 2022-09-02 16:47:15 +02:00
Alex Auvolat
943d76c583
Ability to dynamically set resync tranquility 2022-09-02 15:34:21 +02:00
Alex Auvolat
6226f5ceca
Update to netapp 0.4.5 - fixed ping 2022-09-02 14:33:12 +02:00
Alex Auvolat
efbca67ce4
Add env filter to tracing subscriber 2022-08-31 14:39:12 +02:00
Alex Auvolat
44cd98d2e4
Tracing-subscriber: write to stderr 2022-08-31 14:28:17 +02:00
Alex Auvolat
dd5304f6fc
Replace logging crate pretty_env_logger by tracing_subscriber::fmt 2022-08-31 14:24:41 +02:00
Alex Auvolat
ebc20a8798
Merge branch 'main' into lx-perf-improvements 2022-08-29 16:44:13 +02:00
Quentin Dufour
2c7bae935a
Configure structopt to report the right version
By default, structopt reports the value provided by
the env var CARGO_PKG_VERSION, feeded by Cargo when reading
Cargo.toml. However for Garage we use a versioning based on git,
so we often report a version that is behind the real version.
In this commit, we create garage_util::version::garage() that
reports the right version and configure all structopt subcommands
to call this function instead of using the env var.
2022-08-11 10:21:45 +02:00
Alex Auvolat
16f6a1a65d
fix clippy 2022-07-29 12:24:49 +02:00
Alex Auvolat
ad35b18bb1
Faster chunker 2022-07-29 12:24:49 +02:00
Alex Auvolat
ff4771c36a
cargo fmt 2022-07-29 12:24:48 +02:00
Alex Auvolat
381eb9a5a1
Fix tests 2022-07-29 12:24:48 +02:00
Alex Auvolat
2cad656a03
More make clippy happy 2022-07-29 12:24:48 +02:00
Alex Auvolat
0176da3ad2
Make clippy happy 2022-07-29 12:24:48 +02:00
Alex Auvolat
2f111e6b3d
Performance improvements:
- reduce contention on mutation_lock by having 256 of them
- better lmdb defaults
2022-07-29 12:24:48 +02:00
Alex Auvolat
1b2e1296eb
Compute hashes on dedicated threads 2022-07-29 12:24:44 +02:00
Alex Auvolat
ac03fa7937
Uniformize tracing::* imports (hopefully fixes 32-bit build) 2022-07-15 18:31:19 +02:00
Alex
4f38cadf6e Background task manager (#332)
- [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>
2022-07-08 13:30:26 +02:00
Alex Auvolat
aab34bfe54
add delays in k2v test_items_and_indices 2022-07-08 10:41:57 +02:00
Alex
fe3fa83de7 Publish k2v-client crate to crates.io (#337)
Co-authored-by: Alex Auvolat <alex@adnab.me>
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/337
Co-authored-by: Alex <alex@adnab.me>
Co-committed-by: Alex <alex@adnab.me>
2022-07-04 18:27:25 +02:00
Alex Auvolat
b6d59ec19a
Fix poll item when item didn't change 2022-07-04 14:00:02 +02:00
Alex
0850bac874 Add poll command to k2v-cli (#335)
Co-authored-by: Alex Auvolat <alex@adnab.me>
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/335
Co-authored-by: Alex <alex@adnab.me>
Co-committed-by: Alex <alex@adnab.me>
2022-07-04 12:45:32 +02:00
Alex
77e3fd6db2 improve internal item counter mechanisms and implement bucket quotas (#326)
- [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>
2022-06-15 20:20:28 +02:00