Commit Graph

19 Commits

Author SHA1 Message Date
Yureka 899292ee28 refactor: make TableShardedReplication a thin wrapper around LayoutManager 2025-04-28 11:51:01 +02:00
Yureka c8e9c45889 refactor: Use ReplicationFactor type in more places
- Remove the replication_factor.replication_factor() in favor of
  usize::from(replication_factor) to make the conversion more explicit.

- Implement Display on ReplicationFactor so that it can be formatted
  without converting to usize

- Use ReplicationFactor in the constructor of LayoutVersion and add a
  method to get a ReplicationFactor from a LayoutVersion, despite
  LayoutVersion still storing it as usize internally.
2025-04-21 19:47:14 +02:00
Alex Auvolat 2f2a96b51d layout & replication mode refactoring 2025-03-25 11:05:00 +01:00
Alex Auvolat e6862c5d3d cli: uniformize output and add some infos 2025-03-12 15:05:37 +01:00
Baptiste Jonglez 6d798c640f WIP: fix crash in layout computation when changing all nodes of a zone to gateway mode
This change is probably not a proper fix, somebody with more expertise on
this code should look at it.

Here is how to reproduce the crash:

- start with a layout with two zones
- move all nodes of a zone to gateway mode: `garage layout assign fea54bcc081f318 -g`
- `garage layout show` will panic with a backtrace

Fortunately, the crash is only on the RPC client side, not on the Garage
server itself, and `garage layout revert` still works to go back to the
previous state.

As far as I can tell, this bug is present since Garage 0.9.0 which
includes the new layout assignation algorithm:

  https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/296
2025-01-27 19:33:57 +01:00
Stefan Majer 2eb9fcae20 Fix all typos 2025-01-16 13:22:00 +01:00
Alex Auvolat 85b5a6bcd1 fix some clippy lints 2023-12-11 15:31:47 +01:00
Alex Auvolat 4dbf254512 layout: refactoring, merge two files 2023-12-08 14:15:52 +01:00
Alex Auvolat 063294dd56 layout version: refactor get_node_zone 2023-12-08 11:50:58 +01:00
Alex Auvolat b3e729f4b8 layout history merge: rm invalid versions when valid versions are added 2023-11-15 12:15:58 +01:00
Alex Auvolat 3b361d2959 layout: prepare for write sets 2023-11-14 14:28:16 +01:00
Alex Auvolat 1aab1f4e68 layout: refactoring of all_nodes 2023-11-14 13:12:32 +01:00
Alex Auvolat 8e292e06b3 layout: some refactoring of nongateway nodes 2023-11-14 12:48:38 +01:00
Alex Auvolat 9a491fa137 layout: fix test 2023-11-11 13:10:59 +01:00
Alex Auvolat ce89d1ddab table sync: adapt to new layout history 2023-11-11 12:08:32 +01:00
Alex Auvolat df36cf3099 layout: add helpers to LayoutHistory and prepare integration with Table 2023-11-09 16:32:31 +01:00
Alex Auvolat 03ebf18830 layout: begin managing the update tracker values 2023-11-09 15:31:59 +01:00
Alex Auvolat 523d2ecb95 layout: use separate CRDT for staged layout changes 2023-11-09 11:19:43 +01:00
Alex Auvolat fe9af1dcaa WIP: garage_rpc: store layout version history 2023-11-08 17:49:06 +01:00