mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-18 02:33:15 +00:00
fix(tier): lock tier config mutations (#5080)
* fix(tier): lock tier config mutations Co-Authored-By: heihutu <heihutu@gmail.com> * fix(tier): add mutation RPC auth contract (#5082) Co-authored-by: heihutu <heihutu@gmail.com> * fix(tier): add peer mutation handler core (#5084) Co-authored-by: heihutu <heihutu@gmail.com> * fix(tier): add mutation control rpc service (#5087) Co-authored-by: heihutu <heihutu@gmail.com> * fix(tier): recover prepared mutation drains (#5093) Recover prepared tier mutation intent records into the local tier runtime so a restarted peer fails closed before issuing new remote-tier operation leases or conflicting admin publishes. Reconcile the recovered block map on each scan so committed, aborted, or removed intents clear stale local blocks instead of wedging the peer until process restart. Co-authored-by: heihutu <heihutu@gmail.com> * fix(tier): prove zero references before tier removal (#5092) Signed-off-by: houseme <housemecn@gmail.com> Co-authored-by: heihutu <heihutu@gmail.com> * fix(tier): clear peer mutation runtime blocks (#5094) Install prepared mutation runtime blocks when peer prepare requests are applied or replayed so followers fail closed immediately before restart recovery. Clear the in-memory block once peer commit or abort reaches a durable terminal state, including delayed duplicate prepare requests that observe a committed or aborted record. Co-authored-by: heihutu <heihutu@gmail.com> --------- Signed-off-by: houseme <housemecn@gmail.com> Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
@@ -865,6 +865,39 @@ message LoadTransitionTierConfigResponse {
|
||||
optional string error_info = 2;
|
||||
}
|
||||
|
||||
message TierMutationPrepareRequest {
|
||||
uint32 version = 1;
|
||||
string mutation_id = 2;
|
||||
bytes canonical_payload = 3;
|
||||
}
|
||||
|
||||
message TierMutationCommitRequest {
|
||||
uint32 version = 1;
|
||||
string mutation_id = 2;
|
||||
bytes canonical_payload = 3;
|
||||
}
|
||||
|
||||
message TierMutationAbortRequest {
|
||||
uint32 version = 1;
|
||||
string mutation_id = 2;
|
||||
bytes canonical_payload = 3;
|
||||
}
|
||||
|
||||
enum TierMutationPeerState {
|
||||
TIER_MUTATION_PEER_STATE_UNSPECIFIED = 0;
|
||||
TIER_MUTATION_PEER_STATE_PREPARED = 1;
|
||||
TIER_MUTATION_PEER_STATE_COMMITTED = 2;
|
||||
TIER_MUTATION_PEER_STATE_ABORTED = 3;
|
||||
}
|
||||
|
||||
message TierMutationControlResponse {
|
||||
bool success = 1;
|
||||
TierMutationPeerState state = 2;
|
||||
bool applied = 3;
|
||||
optional string error_info = 4;
|
||||
bytes response_proof = 5;
|
||||
}
|
||||
|
||||
message GetLiveEventsRequest {
|
||||
uint64 after_sequence = 1;
|
||||
uint32 limit = 2;
|
||||
@@ -983,3 +1016,9 @@ service NodeService {
|
||||
service HealControlService {
|
||||
rpc HealControl(HealControlRequest) returns (HealControlResponse) {};
|
||||
}
|
||||
|
||||
service TierMutationControlService {
|
||||
rpc PrepareTierMutation(TierMutationPrepareRequest) returns (TierMutationControlResponse) {};
|
||||
rpc CommitTierMutation(TierMutationCommitRequest) returns (TierMutationControlResponse) {};
|
||||
rpc AbortTierMutation(TierMutationAbortRequest) returns (TierMutationControlResponse) {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user