Commit graph

123 commits

Author SHA1 Message Date
Alex Auvolat
7b119c0b4f bump version number to v2.3.0 2026-04-16 18:34:27 +02:00
Gwen Lg
674c2c1cb1 chore: update quick-xml dep
rework associated error, and fixup error for XML serialization.
Should be InternalError/INTERNAL_SERVER_ERROR not MalformedXML/BAD_REQUEST
2026-02-20 21:29:26 +00:00
rajsinghtech
69cd230568 fix: enable TCP keepalive on RPC connections (#1348)
Garage RPC connections have no TCP keepalive enabled. When a connection dies silently (proxy pod restart, NAT timeout, network partition), it's only detected by application-level pings after ~60s (4 failed pings x 15s interval). During this window, the node appears connected but all RPC calls to it fail.

Enable TCP keepalive on both outgoing and incoming RPC connections via socket2:
- Idle time before first probe: 30s (TCP_KEEPALIVE_TIME)
- Probe interval after first: 10s (TCP_KEEPALIVE_INTERVAL)

A helper set_keepalive() function avoids duplicating the socket2 setup. Incoming connection keepalive failures are logged as warnings but don't reject the connection.

Companion to #1345 (stale address pruning + connect timeout). Together they address both halves of the reconnection problem: faster detection (this PR) and faster recovery.

Co-authored-by: Raj Singh <raj@tailscale.com>
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1348
Reviewed-by: maximilien <git@mricher.fr>
Co-authored-by: rajsinghtech <rajsinghtech@noreply.localhost>
Co-committed-by: rajsinghtech <rajsinghtech@noreply.localhost>
2026-02-20 21:28:29 +00:00
Gwen Lg
9b3e4716bf refactor: rework uri_encode to limit allocation
add add some related tests.

catched from clippy lint `format_collect`
message: use of `format!` to build up a string from an iterator
  --> src/api/common/encoding.rs:12:17
   |
12 |                   let value = format!("{}", c)
   |  _____________________________^
13 | |                     .bytes()
14 | |                     .map(|b| format!("%{:02X}", b))
15 | |                     .collect::<String>();
   | |________________________________________^
   |
help: call `fold` instead
  --> src/api/common/encoding.rs:14:7
   |
14 |                     .map(|b| format!("%{:02X}", b))
   |                      ^^^
help: ... and use the `write!` macro here
  --> src/api/common/encoding.rs:14:15
   |
14 |                     .map(|b| format!("%{:02X}", b))
   |                              ^^^^^^^^^^^^^^^^^^^^^
   = note: this can be written more efficiently by appending to a `String` directly
   = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#format_collect
2026-02-17 18:38:44 +00:00
Gwen Lg
83f8bdbacd refactor: remove unnecessarily wrap value into a Result
this simplify code and remove some unwrap.
warning: this function's return value is unnecessarily wrapped by `Result`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#unnecessary_wraps
2026-02-17 18:38:44 +00:00
Gwen Lg
b060a7e0f1 fix: remove func call from alternative value.
this avoid useless allocation or non-trivial work, if the default value
is not needed/used.

add a line in Cargo.toml to easly enable or_fun_call lint
help: https://rust-lang.github.io/rust-clippy/master/index.html?search=or_fun_call
2026-02-17 18:38:44 +00:00
Gwen Lg
bbb62dfa85 refactor: use u64::midpoint instead of manual implementation
warning: manual implementation of `midpoint` which can overflow
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#manual_midpoint
2026-02-17 18:38:44 +00:00
Gwen Lg
f59a8b7f62 style: corrects the use of ';' to improve readability
- remove unnecessary semicolon
and enable lint warning: unnecessary semicolon
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#unnecessary_semicolon
- add `;` to the last statement for consitent formatting
and enable lint `clippy::semicolon_if_nothing_returned`
warning: consider adding a `;` to the last statement for consistent formatting
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#semicolon_if_nothing_returned
2026-02-17 18:38:44 +00:00
Gwen Lg
08fd6e659f docs: add missing backticks in documentation
this improve readability of documentation.
enable associated clippy lint `doc_markdown`
2026-02-17 18:38:44 +00:00
Gwen Lg
6cde00073f chore: enable workspace configuration of lints in Cargo.toml
and use workspace configuration in each package.
This allow to customize clippy and rust lint configuration for project.
No particular configuration in this commit.
2026-02-17 18:38:44 +00:00
Alex Auvolat
7ad0f96222 release builds: set lto="thin" and strip="debuginfo" (#1342)
- thin LTO is much much faster to compile, this will help when making
  release builds
- strip="debuginfo" allows to still have symbols when unwinding stack
  traces, which are usefull to have in user's bug reports. Binary size
  is increased from 23M to 27M, so a reasonable increase

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1342
Co-authored-by: Alex Auvolat <lx@deuxfleurs.fr>
Co-committed-by: Alex Auvolat <lx@deuxfleurs.fr>
2026-02-15 08:58:57 +00:00
Gwen Lg
c82015f6cf chore: update nom dependency to 0.8
update syntax with :
- add explicit call of `parse` method
- add ref slice management for `tag` fn
2026-02-14 19:25:49 +00:00
Gwen Lg
8ce4415edb chore: update k8s related dependencies
- k8s-openapi, kube and schemars
2026-02-10 19:16:49 +00:00
Gwen Lg
75c28faa5b chore: update tokio and hyper-rustls dependencies 2026-02-10 19:16:49 +00:00
Gwen Lg
8644511ebc chore: update aws dependencies
aws-sigv4, aws-smithy-runtime, aws-sdk-config, aws-sdk-s3
2026-02-10 19:16:49 +00:00
Gwen Lg
e5627bbd6b chore: update reqwest dependency to 0.13 2026-02-10 19:16:49 +00:00
Gwen Lg
3aeb6d88af update fjall dep to 2.11 2026-02-10 19:16:49 +00:00
Gwen Lg
6f44631973 chore: update various dependencies than don't need code changes
and run cargo update
2026-02-10 19:16:49 +00:00
Gwen Lg
566a0b44c0 chore: update bytesize dependency to 2.3
include code update to follow display management change.
2026-02-10 19:16:49 +00:00
Gwen Lg
934c4c31f1 chore: update dependency rand to 0.9 2026-02-10 19:16:49 +00:00
Gwen Lg
be8e4c9dcf chore: remove patch version of deps in Cargo.toml
as cargo can update a crate to last patch version anyway, it's can be
confusing.
2026-02-10 19:16:49 +00:00
Gwen Lg
6e98f5e74e upgrade heed to version 0.22 (#1318)
- migration from `ByteSlice` to `Bytes` heed type.
- not sure about the impact of only one `read_txn` for the entire function `list_trees`, whereas before `open_database` call uses their own access controller.

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1318
Co-authored-by: Gwen Lg <me@gwenlg.fr>
Co-committed-by: Gwen Lg <me@gwenlg.fr>
2026-02-07 13:22:46 +00:00
Gwen Lg
295c850380 chore: add taplo.toml and resave Cargo.toml
Signed-off-by: Gwen Lg <me@gwenlg.fr>
2026-01-29 20:49:28 +01:00
Gwen Lg
33d37b24bd fix: remove duplicate net feature of tokio
Signed-off-by: Gwen Lg <me@gwenlg.fr>
2026-01-29 20:49:28 +01:00
Gwen Lg
46f6967934 chore: update arc-swap to v1.1 as 1.0 is yanked 2026-01-29 20:49:28 +01:00
Alex Auvolat
582b168b6a bump version to v2.2.0 2026-01-24 12:32:22 +01:00
majudev
090dbb412a Change optimization level to 3 2025-11-24 18:12:01 +01:00
Alex
eac3a60050 Merge pull request 'migrate to this error, garage-v2' (#1219) from thiserror-2 into main-v2
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1219
Reviewed-by: Alex <lx@deuxfleurs.fr>
2025-11-12 08:05:43 +00:00
trinity-1686a
1fe932d07f migrate to this error
it doesn't generate a bazillion warning at compile time
2025-11-01 17:25:23 +01:00
trinity-1686a
7e5bb51287 upgrade crc-fast 2025-11-01 15:43:08 +00:00
Alex Auvolat
b43f309ec7 bump version to v2.1.0 2025-09-15 15:50:02 +02:00
Alex Auvolat
9c067c0cbd Merge branch 'main-v1' into sync-v2-to-v1 2025-09-14 21:04:04 +02:00
Alex Auvolat
5687fc0375 update rusqlite and snapshot using VACUUM INTO 2025-09-14 19:22:36 +02:00
Alex Auvolat
909359ca4c Merge branch 'main-v1' into sync-v2-to-v1 2025-09-14 17:02:34 +02:00
Alex Auvolat
aa69c06f2b fix potential race condition and naming bug in fjall adapter 2025-08-27 20:22:38 +02:00
Julien Kritter
96d7713915 Add support for an LSM-tree-based backend with Fjall 2025-08-27 18:54:34 +02:00
Alex Auvolat
fbf03e9378 bump version to v1.2.0 2025-06-13 14:21:28 +02:00
Alex Auvolat
dc1a4ffd76 Merge branch 'main' into next-v2 2025-06-13 14:01:39 +02:00
Renjaya Raga Zenta
8843aa92fa
feat: add log to journald feature
The systemd-journald is used in most major Linux distros that use systemd.
This enables logging using the systemd-journald native protocol, instead
of just writing to stderr.
2025-06-02 11:55:27 +07:00
Alex Auvolat
7ab1d176d4 Merge branch 'main' into next-v2 2025-05-23 16:33:07 +02:00
Alex Auvolat
e475c7f802 api: switch to crc_fast for checksumming and implement full-object mpu checksums 2025-05-22 17:03:54 +02:00
trinity-1686a
a605a80806 support punnycode in api/web endpoint 2025-05-19 18:11:55 +02:00
Alex Auvolat
d38d62f4d7 bump version to v2.0.0 2025-04-17 12:36:41 +02:00
Alex Auvolat
c9156f6828 Merge branch 'main' into next-v2 2025-03-25 10:02:41 +01:00
Alex Auvolat
a7d845a999 change aws-sdk features to avoid using aws-lc which doesn't compile on i686/arm 2025-03-20 17:05:43 +01:00
Alex Auvolat
dd20e5d22a update cargo dependencies 2025-03-20 13:36:01 +01:00
Alex Auvolat
a826c361a9 add crc64nvme checksumming algorithm (fix #963) 2025-03-19 15:51:06 +01:00
Alex Auvolat
22c0420607 admin api: specify date-time format in openapi spec 2025-03-11 18:25:46 +01:00
Alex Auvolat
d067a40b3f admin api: add functions to manage admin api tokens 2025-03-11 15:17:31 +01:00
Alex Auvolat
ba68506c36 admin api: generate openapi spec using utoipa (wip) 2025-03-06 12:26:14 +01:00