NLnet task 3 #667

Merged
lx merged 60 commits from nlnet-task3 into next-0.10 2024-01-11 10:58:08 +00:00
Owner

This PR tracks the progress of NLnet task 3, fixing #495 - read-after-write consistency when layout changes.

Subtask 1 (Jepsen testing): See PR #544 for details.

  • Jepsen testing was achieved
    • Without layout changes, Jepsen found no consistency anomalies
    • When introducing layout changes, anomalies began to occur

Subtask 2 (write and prove solution):

  • Think of a solution.
  • Write down some notes on the solution and sketch a proof.

Subtask 3 (implementation): Mostly in this PR:

  • Change layout data structure to keep track of layout history and update trackers (that track the sync status of all nodes in the cluster)
  • Naively adapt existing code to new layout data structures
  • Add layout manager that handles update trackers
  • Adapt the resync procedure to take into account the layout history, and to correctly update the update trackers
  • Adapt the table read/write functions to access correct nodes given current layout history and values of update trakcers
    • Table::insert
    • Table::insert_many
    • BlockManager::rpc_put_block
  • Layout ACK locking while writes are in progress
  • Make sure data blocks also can still be found, since block moving is not taken into account in sync_map
  • Caching of current ack and sync values in layout history / update tracker
  • Adapt System::health()
  • Update the CLI to make info from the update trackers visible
  • Update the admin API as well
  • Add a command to consider a node or set of nodes "dead" and forcibly advance the update trackers for that node

--

FIXES:

  • gateways must also ack!
  • improve recovery procedure when nodes are unavailable, by allowing individual node sync operations to be marked as completed in sync_map even if not all sync targets were completed successfully, as long as a quorum among all write sets was achieved
  • similarly, ack_sync can progress even if not all nodes have finished a sync, as long as a quorum among all write sets of all partitions was achieved

--

  • Hand testing
  • Proof-reading

LEFT FOR FUTURE PRs:

  • Add garage layout skip-dead-nodes equivalent to admin API?
  • ack_map could be forcibly increased after a certain delay (15 minutes?), to avoid user having to call garage layout skip-dead-nodes when some nodes are unavailable
  • Can GC be improved to benefit from the update trackers? See #151. Also just fix GC that is probably broken (but always has been?)
  • Improve/fix/refactor K2V RPCs (for insertion and for polling)

Subtask 4 (re-testing): WIP, some is also in PR #544

This PR tracks the progress of NLnet task 3, fixing #495 - read-after-write consistency when layout changes. **Subtask 1 (Jepsen testing):** See PR #544 for details. - [x] Jepsen testing was achieved - [x] Without layout changes, Jepsen found no consistency anomalies - [x] When introducing layout changes, anomalies began to occur **Subtask 2 (write and prove solution):** - [x] Think of a solution. - [x] Write down some notes on the solution and sketch a proof. **Subtask 3 (implementation):** Mostly in this PR: - [x] Change layout data structure to keep track of layout history and update trackers (that track the sync status of all nodes in the cluster) - [x] Naively adapt existing code to new layout data structures - [x] Add layout manager that handles update trackers - [x] Adapt the resync procedure to take into account the layout history, and to correctly update the update trackers - [x] Adapt the table read/write functions to access correct nodes given current layout history and values of update trakcers - [x] Table::insert - [x] Table::insert_many - [x] BlockManager::rpc_put_block - [x] Layout ACK locking while writes are in progress - [x] Make sure data blocks also can still be found, since block moving is not taken into account in sync_map - [x] Caching of current ack and sync values in layout history / update tracker - [x] Adapt `System::health()` - [x] Update the CLI to make info from the update trackers visible - [x] Update the admin API as well - [x] Add a command to consider a node or set of nodes "dead" and forcibly advance the update trackers for that node -- FIXES: - [x] gateways must also ack! - [x] improve recovery procedure when nodes are unavailable, by allowing individual node sync operations to be marked as completed in sync_map even if not all sync targets were completed successfully, as long as a quorum among all write sets was achieved - [x] similarly, ack_sync can progress even if not all nodes have finished a sync, as long as a quorum among all write sets of all partitions was achieved -- - [x] Hand testing - [x] Proof-reading LEFT FOR FUTURE PRs: - Add `garage layout skip-dead-nodes` equivalent to admin API? - ack_map could be forcibly increased after a certain delay (15 minutes?), to avoid user having to call `garage layout skip-dead-nodes` when some nodes are unavailable - Can GC be improved to benefit from the update trackers? See #151. Also just fix GC that is probably broken (but always has been?) - Improve/fix/refactor K2V RPCs (for insertion and for polling) **Subtask 4 (re-testing):** WIP, some is also in PR #544 - [x] Jepsen - Final results: [BEFORE PATCH](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/commit/fa9247f11b89c960dffe82d6bf990ed4335788e3/script/jepsen.garage/results/Results-2023-12-13-tsfix2.png), [AFTER PATCH](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/commit/fa9247f11b89c960dffe82d6bf990ed4335788e3/script/jepsen.garage/results/Results-2023-12-13-task3c.png)
lx added 2 commits 2023-11-08 14:42:02 +00:00
remove Ring and use ClusterLayout everywhere
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
12d1dbfc6b
lx added 1 commit 2023-11-08 15:41:18 +00:00
avoid using layout_watch in System directly
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
4a9c94514f
lx added 2 commits 2023-11-08 18:28:56 +00:00
cluster layout: adapt all uses of ClusterLayout to LayoutHistory
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
8dccee3ccf
lx added 1 commit 2023-11-08 18:31:17 +00:00
bump garage protocol version tag to 0x000A (0.10)
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
1da0a5676e
lx added 1 commit 2023-11-09 10:20:06 +00:00
layout: use separate CRDT for staged layout changes
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
523d2ecb95
lx added 1 commit 2023-11-09 11:55:58 +00:00
wip: split out layout management from System into separate LayoutManager
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
8a2b1dd422
lx added 2 commits 2023-11-09 13:12:22 +00:00
layout: refactor to use a RwLock on LayoutHistory
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
bfb1845fdc
lx added 1 commit 2023-11-09 13:53:54 +00:00
layout: separate code path for synchronizing update trackers only
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
94caf9c0c1
lx added 1 commit 2023-11-09 14:32:17 +00:00
layout: begin managing the update tracker values
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
03ebf18830
lx added 1 commit 2023-11-09 14:42:29 +00:00
layout admin: add missing calls to update_hash
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
bad7cc812e
lx added 1 commit 2023-11-09 14:53:00 +00:00
layout: fix tracker bugs
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
9d95f6f704
lx changed title from WIP: NLnet task 3 to WIP: NLnet task 3 subtask 3 (implementation) 2023-11-09 14:54:11 +00:00
lx added 1 commit 2023-11-09 15:32:50 +00:00
layout: add helpers to LayoutHistory and prepare integration with Table
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
df36cf3099
lx added 1 commit 2023-11-11 11:08:56 +00:00
table sync: adapt to new layout history
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
ce89d1ddab
lx force-pushed nlnet-task3 from 0f319a1c04 to df24bb806d 2023-11-11 11:44:34 +00:00 Compare
lx added 1 commit 2023-11-11 12:11:16 +00:00
layout: fix test
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
9a491fa137
lx added 1 commit 2023-11-14 11:48:56 +00:00
layout: some refactoring of nongateway nodes
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
8e292e06b3
lx force-pushed nlnet-task3 from 74109c699e to 1aab1f4e68 2023-11-14 12:12:41 +00:00 Compare
lx added 1 commit 2023-11-14 12:29:40 +00:00
layout: fixes in schema
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
83a11374ca
lx added 2 commits 2023-11-14 13:28:36 +00:00
layout: prepare for write sets
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
3b361d2959
lx added 1 commit 2023-11-14 14:41:13 +00:00
table: take into account multiple write sets in inserts
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
90e1619b1e
lx added 1 commit 2023-11-14 14:45:09 +00:00
layout: fix test
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
7ef2c23120
lx added 1 commit 2023-11-15 11:16:24 +00:00
layout history merge: rm invalid versions when valid versions are added
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
b3e729f4b8
lx added 2 commits 2023-11-15 12:07:56 +00:00
rpc: fix write set quorums
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
acd49de9f9
lx added 2 commits 2023-11-15 13:21:24 +00:00
layout: add helper for cached/external values to centralize recomputation
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
393c4d4515
lx added 1 commit 2023-11-15 14:40:58 +00:00
layou: implement ack locking
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
33c8a489b0
lx added 1 commit 2023-11-15 14:57:10 +00:00
layout: fix test
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
continuous-integration/drone Build is passing
d4df03424f
lx added 1 commit 2023-11-16 12:27:04 +00:00
layout: split helper in separate file; more precise difference tracking
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
ad5c6f779f
lx added 1 commit 2023-11-16 12:52:09 +00:00
layout: refactor digests and add "!=" assertions before epidemic bcast
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
continuous-integration/drone Build is passing
707442f5de
lx added 2 commits 2023-11-16 15:42:00 +00:00
table: implement write sets for insert_many
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
3ecd14b9f6
lx changed title from WIP: NLnet task 3 subtask 3 (implementation) to WIP: NLnet task 3 2023-11-16 15:43:39 +00:00
lx added 1 commit 2023-11-27 10:53:32 +00:00
block manager: read_block using old layout versions if necessary
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
d6d239fc79
lx added 1 commit 2023-11-27 11:10:46 +00:00
rpc: update system::health to take into account write sets for all partitions
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
78362140f5
lx added 1 commit 2023-11-27 12:19:18 +00:00
cli: show when nodes are draining metadata
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
539a920313
lx force-pushed nlnet-task3 from a081e74bd7 to c539077d30 2023-11-27 15:22:34 +00:00 Compare
lx added 1 commit 2023-11-28 10:13:01 +00:00
rpc helper: write comments + small refactoring of tracing
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
539af6eac4
lx added 1 commit 2023-11-28 13:25:21 +00:00
admin: more info in admin GetClusterStatus
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
c04dd8788a
lx added 1 commit 2023-12-07 09:30:52 +00:00
layout updates: fix the set of nodes among which minima are calculated
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
c8356a91d9
lx force-pushed nlnet-task3 from 9358658cc5 to 95eb13eb08 2023-12-07 09:57:29 +00:00 Compare
lx added 1 commit 2023-12-07 10:27:47 +00:00
table sync: use write quorums to report global success or failure of sync
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
d90de365b3
lx added 1 commit 2023-12-07 10:56:22 +00:00
layout cli: safer skip-dead-nodes command
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
aa59059a91
lx force-pushed nlnet-task3 from 2b93daa78d to 9cecea64d4 2023-12-07 13:51:31 +00:00 Compare
lx added 1 commit 2023-12-07 14:16:15 +00:00
fix build with discovery features
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
431b28e0cf
lx added 1 commit 2023-12-08 09:36:53 +00:00
rpc: fix system::health
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
91b874c4ef
lx added 1 commit 2023-12-08 10:24:50 +00:00
cli: improvements to the layout commands when multiple layouts are live
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
7f2541101f
lx added 1 commit 2023-12-08 10:51:13 +00:00
layout version: refactor get_node_zone
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
063294dd56
lx added 1 commit 2023-12-08 11:03:07 +00:00
layout: move block_read_nodes_of to rpc_helper to avoid double-locking
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
5dd200c015
(in theory, this could have caused a deadlock)
lx added 1 commit 2023-12-08 11:18:26 +00:00
rpc helper: small refactorings
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
64a6e557a4
lx added 1 commit 2023-12-08 13:16:06 +00:00
layout: refactoring, merge two files
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build was killed
4dbf254512
lx added 1 commit 2023-12-08 13:54:32 +00:00
table: fix insert_many to not send duplicates
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
f8df90b79b
lx added 1 commit 2023-12-11 13:58:07 +00:00
table: remove redundant tracing in insert_many
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
e4f493b481
lx added 1 commit 2023-12-11 14:32:03 +00:00
fix some clippy lints
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
85b5a6bcd1
lx added 1 commit 2023-12-11 14:46:50 +00:00
layout: refactor/fix bad while loop
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
adccce1145
lx added 1 commit 2023-12-11 15:09:47 +00:00
layout: refactoring and fix in layout helper
Some checks reported errors
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build was killed
continuous-integration/drone Build is passing
0041b013a4
lx changed target branch from main to next-0.10 2024-01-11 10:57:14 +00:00
lx changed title from WIP: NLnet task 3 to NLnet task 3 2024-01-11 10:57:29 +00:00
lx merged commit 8a6ec1d611 into next-0.10 2024-01-11 10:58:08 +00:00
lx deleted branch nlnet-task3 2024-01-11 10:58:09 +00:00
First-time contributor

Add garage layout skip-dead-nodes equivalent to admin API?

Is there any plan to effectively add this API endpoint?

> Add garage layout skip-dead-nodes equivalent to admin API? Is there any plan to effectively add this API endpoint?
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#667
No description provided.