Arthur Carcano
74ad3bf887
Replace the existential lifetime in sqlite adapter with a static one ( #1407 )
...
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1407
Reviewed-by: Alex <lx@deuxfleurs.fr >
2026-04-20 09:28:46 +00:00
Alex Auvolat
7b119c0b4f
bump version number to v2.3.0
2026-04-16 18:34:27 +02:00
Alex Auvolat
02d5e67698
db: avoid iterating bounded from empty slice ( fix #1401 ) ( #1408 )
...
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1408
Co-authored-by: Alex Auvolat <lx@deuxfleurs.fr >
Co-committed-by: Alex Auvolat <lx@deuxfleurs.fr >
2026-04-16 16:33:28 +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
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
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
cd5cd37ecc
style: improve lisibility of db_path code
...
split suffix get from match self and path construction
2026-01-29 20:49:28 +01:00
Gwen Lg
b0ee7dd3c9
chore: localy disable some lints
...
- clippy::nonminimal_bool disabled for check_size_filter function
clippy message: this boolean expression can be simplified
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#nonminimal_bool
- clippy::large_enum_variant for `DecryptStreamState` and `State`
- clippy::too_many_arguments for `put_block_and_meta` and
`test_read_encrypted`
- clippy::deref_addrof for specific unsafe code
- clippy::doc_overindented_list_items and clippy::doc_lazy_continuation
2026-01-29 20:49:28 +01:00
Gwen Lg
24e11e99ee
style: some small fixes
...
- remove invalid struct pattern
lint message: struct pattern is not needed for a unit variant
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unneeded_struct_pattern
- remove call to default() on unit struct
lint message: use of `default` to create a unit struct
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#default_constructed_unit_structs
- replace if/else by direct affectation
lint message: this if-then-else expression assigns a bool literal
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_bool_assign
- replace assert_eq on unit by `unwrap` + let typed binding
2026-01-29 20:49:28 +01:00
Gwen Lg
8772db8228
refactor: rename method to avoid confusion
...
- rename SqliteDb::new to `_::open` as it's not return Self
lint message: methods called `new` usually return `Self`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#new_ret_no_self
- rename method `add` to `add_calgorithm`
The semantics of this has nothing to do with an `add` operation in the sense of the `Add` trait.
And method `add` can be confused for the standard trait method std::ops::Add::add
lint https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#should_implement_trait
2026-01-29 20:49:28 +01:00
Gwen Lg
5307b3f762
chore: remove unnecessary cast usize
...
lint message: casting to the same type is unnecessary (`u64` -> `u64`)
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast
+ disable `clippy::unnecessary_cast` for update_disk_usage
where the size of the input values depends on the platform
2026-01-29 20:49:28 +01:00
Gwen Lg
f2f6669bf0
style: clean use for question_mark
...
- remove useless `Ok` enclosing with `?`
lint message: enclosing `Ok` and `?` operator are unneeded
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_question_mark
- use question mark instead of manual implementation
lint message: this `match` expression can be replaced with `?`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#question_mark
2026-01-29 20:49:28 +01:00
Gwen Lg
21db7a4d4b
chore: remove various useless code
...
- call expect directly on Result
lint message: called `ok().expect()` on a `Result` value
help: you can call `expect()` directly on the `Result`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#ok_expect
- use assign operation instead of manual implementation
lint message: manual implementation of an assign operation
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#assign_op_pattern
- remove useless call to format
lint message: useless use of `format!`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_format
- remove useless `?Sized`
lint message: `?Sized` bound is ignored because of a `Sized` requirement
note: ...because `Deserialize` has the bound `Sized`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_maybe_sized
- use is_some instead of pattern maching with Some(_)
lint message: redundant pattern matching, consider using `is_some()`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_pattern_matching
- remove unneeded unit return type
lint message: unneeded unit return type
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unused_unit
- remove redundant closure
lint message: redundant closure
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure
- use derive Default instead of manual implementation
lint message: this `impl` can be derived
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#derivable_impls
- remove unneeded `return` statement
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
- remove empty string from println call
lint message: empty string literal in `println!`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#println_empty_string
- remove clone() on type than implement Copy
lint message: using `clone` on type `Option<ChecksumValue>` which implements the `Copy` trait
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#clone_on_copy
- remove useless let binding
lint message: this let-binding has unit value
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#let_unit_value
- remove useless len comparison to zero, already test of empty
lint message: length comparison to zero
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#len_zero
- remove useless `as_deref` call
lint message: derefed type is same as origin
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_option_as_deref
- remove useless conversion of the same type
lint message: useless conversion to the same type: `replication_mode::ReplicationFactor`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_conversion
- remove useless bool_comparison
lint message: equality checks against false can be replaced by a negation
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#bool_comparison
- remove useless to_string
lint message: unnecessary use of `to_string`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_to_owned
Signed-off-by: Gwen Lg <me@gwenlg.fr >
2026-01-29 20:49:28 +01:00
Gwen Lg
141b3f24f1
chore: clean relative to references and borrows
...
- lint message: the borrowed expression implements the required traits
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrows_for_generic_args
- lint message: this expression creates a reference which is immediately dereferenced by the compiler
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow
- lint message: you don't need to add `&` to all patterns
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#match_ref_pat
- remove useless taken reference
lint message: needlessly taken reference of left operand
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#op_ref
- use &Path instead of &PathBuf as fn parameters
lint message: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#ptr_arg
2026-01-29 20:49:28 +01: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
e331f88c85
chore: fix typos in rust code comment or error message
2026-01-29 14:53:27 +01:00
Alex Auvolat
582b168b6a
bump version to v2.2.0
2026-01-24 12:32:22 +01: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
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
0bbf63ee0e
Merge pull request 'update rusqlite and snapshot using VACUUM INTO' ( #1164 ) from update-rusqlite into main-v1
...
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1164
2025-09-14 18:28:01 +00:00
Alex Auvolat
5687fc0375
update rusqlite and snapshot using VACUUM INTO
2025-09-14 19:22:36 +02:00
Alex Auvolat
4c895a7186
garage_db: fix error handling logic ( fix #1138 )
2025-09-14 18:03:31 +02:00
Alex Auvolat
909359ca4c
Merge branch 'main-v1' into sync-v2-to-v1
2025-09-14 17:02:34 +02:00
Alex Auvolat
c8c20d6f47
garage_db: reduce frequency of sqlite snapshot progress log ( fix #1129 )
2025-08-28 00:07:35 +02:00
Alex Auvolat
54b9bf02a3
garage_db: refactor open function
2025-08-27 23:03:09 +02:00
Alex Auvolat
90bba5889a
garage_db: rename len to approximate_len as it is used for stats only
2025-08-27 21:23:45 +02:00
Alex Auvolat
6ea86db8cd
document fjall db engine, remove flakey metadata_fsync implementation
2025-08-27 20:22:41 +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
Arthur Carcano
1b42919bf7
Fix some unsoundness in lmdb adapter unsafe
2025-07-25 23:33:51 +02:00
Alex Auvolat
fbf03e9378
bump version to v1.2.0
2025-06-13 14:21:28 +02:00
Alex Auvolat
7ab1d176d4
Merge branch 'main' into next-v2
2025-05-23 16:33:07 +02:00
Alex Auvolat
d38d62f4d7
bump version to v2.0.0
2025-04-17 12:36:41 +02:00
Baptiste Jonglez
9ec3f8cc3c
metadata: Create compact LMDB snapshots
...
See #1006
LMDB files never shrink, so we can end up with a large database that
contains a smaller amount of actual data.
Compacting the snapshots is an easy win: it will write faster to disk,
take less space, and if needed you can reimport an already-compacted
snapshot as the main database.
2025-04-12 23:18:50 +02:00
Alex Auvolat
4689b10448
bump version to v1.1.0
2025-03-05 10:19:51 +01:00
Alex Auvolat
4563313f87
use cargo-shear to remove many unused dependencies between crates
2025-01-31 18:47:30 +01:00
Baptiste Jonglez
43402c9619
snapshot: sqlite: use a subdirectory for consistency with LMDB
...
Currently, taking a snapshot of the metadata database with sqlite creates
a sqlite file without extension with the following format:
snapshots/2025-01-26T15:29:17Z
This makes it hard to understand what kind of data this is, and is not
consistent with LMDB:
snapshots/2025-01-26T15:29:17Z/data.mdb
With this change, we now get a directory with a single db.sqlite file:
snapshots/2025-01-26T15:29:17Z/db.sqlite
2025-01-27 19:06:52 +01:00
Stefan Majer
2eb9fcae20
Fix all typos
2025-01-16 13:22:00 +01:00
Alex Auvolat
7a143f46fc
Bump to version 1.0.1
2024-09-22 14:25:32 +02:00
Julien Kritter
bd71728874
Tests: don't expect old value after transactional insert
2024-09-12 10:50:53 +02:00
Julien Kritter
51ced60366
Don't fetch old values in cross-partition transactional inserts
2024-09-12 10:26:28 +02:00
marvin-j97
8062ec7b4b
test: fix db tests
2024-09-04 19:24:36 +02:00
marvin-j97
eb416a02fb
dont assert deletion count in sqlite KV adapter
2024-09-04 18:51:51 +02:00
marvin-j97
74363c9060
perf(kv): dont retrieve values for write ops
...
see https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/851
2024-09-04 18:45:17 +02:00
Quentin Dufour
2a93ad0c84
force flag "no read ahead" on LMDB
2024-08-17 21:17:15 +02:00
Alex Auvolat
90e3c2af91
[next-0.10] small updates to mention Garage v0.9.4
2024-04-10 14:35:30 +02:00
Alex Auvolat
afad62939e
[next-0.10] bump version number to 1.0
2024-03-28 15:19:44 +01:00
Alex Auvolat
0038ca8a78
Merge branch 'main' into next-0.10
2024-03-18 20:19:30 +01:00
Alex Auvolat
e8f9718ccd
[sqlite-r2d2] implement connection pooling in sqlite backend
2024-03-18 18:05:25 +01:00