mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 19:17:28 +01:00
Merge main (with #625) into feat/standalone-failover-cli
This commit is contained in:
commit
247d409a12
19 files changed
+1376
-238
No files matched your search
@@ -143,6 +143,9 @@ func guardFindings(code map[string]map[string]bool, decl, tests map[string]bool)
|
||||
if got := owners(code["UpdateHead"]); !reflect.DeepEqual(got, []string{"runTransition"}) {
|
||||
bad = append(bad, "UpdateHead used by "+strings.Join(got, ", ")+"; want only runTransition")
|
||||
}
|
||||
if got := owners(code["CreateVolumeRecord"]); !reflect.DeepEqual(got, []string{"createVolume"}) {
|
||||
bad = append(bad, "CreateVolumeRecord used by "+strings.Join(got, ", ")+"; want only createVolume")
|
||||
}
|
||||
var runs []string
|
||||
for _, fn := range owners(code["runTransition"]) {
|
||||
x, ok := strings.CutPrefix(fn, "Run")
|
||||
@@ -426,7 +429,10 @@ func TestGuard_Controls(t *testing.T) {
|
||||
// A control with a file name replaces that real file (a changed
|
||||
// claim.go); otherwise it is added beside the real sources.
|
||||
for name, c := range map[string]struct{ src, want, file string }{
|
||||
"direct call": {src: `func w(ctx context.Context, st HeadStore, h Head) error { return st.UpdateHead(ctx, h.Gen, h) }`, want: "UpdateHead used by"},
|
||||
"second VOLUME writer": {src: `func w(ctx context.Context, st NewVolumeStore, v Volume) error { return st.CreateVolumeRecord(ctx,v) }`, want: "CreateVolumeRecord used by"},
|
||||
"VOLUME method alias": {src: `func w(st NewVolumeStore) { write := st.CreateVolumeRecord; _ = write }`, want: "CreateVolumeRecord used by"},
|
||||
"VOLUME method expression": {src: `var write = NewVolumeStore.CreateVolumeRecord`, want: "CreateVolumeRecord used by"},
|
||||
"direct call": {src: `func w(ctx context.Context, st HeadStore, h Head) error { return st.UpdateHead(ctx, h.Gen, h) }`, want: "UpdateHead used by"},
|
||||
"method value alias": {src: `func w(ctx context.Context, st HeadStore, h Head) error {
|
||||
update := st.UpdateHead
|
||||
return update(ctx, h.Gen, h)
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package layout
|
||||
|
||||
import (
|
||||
"go/ast"
|
||||
"go/parser"
|
||||
"go/token"
|
||||
"strconv"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// A repeated-id smoke test cannot prove a crypto source: pin the actual entropy
|
||||
// call too. Full width is checked on the public VolumeID value.
|
||||
func TestVolumeIDUses128CryptoRandomBits(t *testing.T) {
|
||||
id, err := NewVolumeID()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(id) != 16 || len(id.String()) != 32 {
|
||||
t.Fatal("volume id is not 128 bits")
|
||||
}
|
||||
f, err := parser.ParseFile(token.NewFileSet(), "volume.go", nil, 0)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
countCryptoReads := func() int {
|
||||
imports := map[string]string{}
|
||||
for _, i := range f.Imports {
|
||||
p, _ := strconv.Unquote(i.Path.Value)
|
||||
if p == "crypto/rand" {
|
||||
name := "rand"
|
||||
if i.Name != nil {
|
||||
name = i.Name.Name
|
||||
}
|
||||
imports[name] = p
|
||||
}
|
||||
}
|
||||
calls := 0
|
||||
for _, d := range f.Decls {
|
||||
fn, ok := d.(*ast.FuncDecl)
|
||||
if !ok || fn.Name.Name != "NewVolumeID" {
|
||||
continue
|
||||
}
|
||||
ast.Inspect(fn.Body, func(n ast.Node) bool {
|
||||
c, ok := n.(*ast.CallExpr)
|
||||
if !ok {
|
||||
return true
|
||||
}
|
||||
sel, ok := c.Fun.(*ast.SelectorExpr)
|
||||
if !ok {
|
||||
return true
|
||||
}
|
||||
recv, ok := sel.X.(*ast.Ident)
|
||||
if ok && imports[recv.Name] == "crypto/rand" && sel.Sel.Name == "Read" && len(c.Args) == 1 {
|
||||
if slice, ok := c.Args[0].(*ast.SliceExpr); ok && slice.Low == nil && slice.High == nil && slice.Max == nil {
|
||||
calls++
|
||||
}
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
return calls
|
||||
}
|
||||
calls := countCryptoReads()
|
||||
if calls != 1 {
|
||||
t.Fatalf("full-buffer crypto/rand.Read calls = %d, want 1", calls)
|
||||
}
|
||||
// A non-cryptographic replacement must fail even if ids are still 16 bytes.
|
||||
for _, i := range f.Imports {
|
||||
if i.Path.Value == "\"crypto/rand\"" {
|
||||
i.Path.Value = "\"math/rand\""
|
||||
}
|
||||
}
|
||||
if countCryptoReads() != 0 {
|
||||
t.Fatal("crypto-source guard accepted math/rand")
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
package layout
|
||||
|
||||
import (
|
||||
"go/ast"
|
||||
"go/parser"
|
||||
"go/token"
|
||||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// Count references, not just calls: method values, method expressions and
|
||||
// package-level aliases can all hide another writer. Resolve the layout import
|
||||
// so unrelated structs' VolumeName fields do not count as the VOLUME constant.
|
||||
// A write using the literal entry name instead of the constant is not caught.
|
||||
func volumeCreationRefs(name string, src []byte) (map[string]int, error) {
|
||||
f, err := parser.ParseFile(token.NewFileSet(), name, src, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
layoutImports := map[string]bool{}
|
||||
for _, i := range f.Imports {
|
||||
p, _ := strconv.Unquote(i.Path.Value)
|
||||
if p == "github.com/seaweedfs/seaweed-block/core/frontend/chunkstore/layout" {
|
||||
alias := "layout"
|
||||
if i.Name != nil {
|
||||
alias = i.Name.Name
|
||||
}
|
||||
layoutImports[alias] = true
|
||||
}
|
||||
}
|
||||
kernel := strings.HasPrefix(name, "core/frontend/chunkstore/layout/")
|
||||
got := map[string]int{}
|
||||
visit := func(n ast.Node, owner string) {
|
||||
ast.Inspect(n, func(n ast.Node) bool {
|
||||
symbol := ""
|
||||
switch x := n.(type) {
|
||||
case *ast.SelectorExpr:
|
||||
if x.Sel.Name == "CreateVolumeRecord" {
|
||||
symbol = x.Sel.Name
|
||||
}
|
||||
if recv, ok := x.X.(*ast.Ident); ok && layoutImports[recv.Name] && x.Sel.Name == "VolumeName" {
|
||||
symbol = x.Sel.Name
|
||||
}
|
||||
if symbol != "" {
|
||||
got[name+" "+owner+" "+symbol]++
|
||||
}
|
||||
return false
|
||||
case *ast.Ident:
|
||||
if x.Name == "VolumeName" && (kernel || layoutImports["."]) {
|
||||
symbol = x.Name
|
||||
}
|
||||
}
|
||||
if symbol != "" {
|
||||
got[name+" "+owner+" "+symbol]++
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
for _, d := range f.Decls {
|
||||
switch x := d.(type) {
|
||||
case *ast.FuncDecl:
|
||||
if x.Body != nil {
|
||||
visit(x.Body, x.Name.Name)
|
||||
}
|
||||
case *ast.GenDecl:
|
||||
for _, spec := range x.Specs {
|
||||
if v, ok := spec.(*ast.ValueSpec); ok {
|
||||
for _, e := range v.Values {
|
||||
visit(e, "<package>")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return got, nil
|
||||
}
|
||||
|
||||
func TestVolumeWriterRepositorySites(t *testing.T) {
|
||||
want := map[string]int{
|
||||
"core/frontend/chunkstore/layout/create.go createVolume CreateVolumeRecord": 1,
|
||||
"core/frontend/chunkstore/layout/read.go VolumeID VolumeName": 1,
|
||||
"core/frontend/chunkstore/layout/verify.go volumeID VolumeName": 1,
|
||||
"core/frontend/chunkstore/layout_create.go ReadVolumeRecord VolumeName": 1,
|
||||
"core/frontend/chunkstore/layout_create.go CreateVolumeRecord VolumeName": 1,
|
||||
}
|
||||
got := map[string]int{}
|
||||
root := filepath.Clean("../../../..")
|
||||
err := filepath.WalkDir(root, func(p string, d fs.DirEntry, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if d.IsDir() {
|
||||
if d.Name() == ".git" || d.Name() == "vendor" {
|
||||
return filepath.SkipDir
|
||||
}
|
||||
return nil
|
||||
}
|
||||
if !strings.HasSuffix(p, ".go") || strings.HasSuffix(p, "_test.go") {
|
||||
return nil
|
||||
}
|
||||
rel, err := filepath.Rel(root, p)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
src, err := os.ReadFile(p)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sites, err := volumeCreationRefs(filepath.ToSlash(rel), src)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for key, n := range sites {
|
||||
got[key] += n
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !reflect.DeepEqual(got, want) {
|
||||
t.Fatalf("VOLUME sites = %v, want exactly %v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestVolumeWriterRepositoryDetectorControls(t *testing.T) {
|
||||
for _, src := range []string{
|
||||
`func hidden(st S){st.CreateVolumeRecord(nil,v)}`,
|
||||
`func hidden(st S){f:=st.CreateVolumeRecord;_ = f}`,
|
||||
`var hidden = S.CreateVolumeRecord`,
|
||||
`func hidden(){e:=filer.Entry{Name:k.VolumeName};_ = e}`,
|
||||
`var hidden = k.VolumeName`,
|
||||
} {
|
||||
raw := `package p; import k "github.com/seaweedfs/seaweed-block/core/frontend/chunkstore/layout";` + src
|
||||
got, err := volumeCreationRefs("core/elsewhere/new.go", []byte(raw))
|
||||
if err != nil || len(got) != 1 {
|
||||
t.Fatalf("missed cross-package writer/constant control %s: %v %v", src, got, err)
|
||||
}
|
||||
}
|
||||
got, err := volumeCreationRefs("core/elsewhere/new.go", []byte(`package p; func f(x S){_ = x.VolumeName}`))
|
||||
if err != nil || len(got) != 0 {
|
||||
t.Fatal("unrelated field mistaken for the layout constant", got, err)
|
||||
}
|
||||
got, err = volumeCreationRefs("core/frontend/chunkstore/layout/create.go", []byte(`package layout; func createVolume(st S){st.CreateVolumeRecord(nil,v);st.CreateVolumeRecord(nil,v)}`))
|
||||
if err != nil || got["core/frontend/chunkstore/layout/create.go createVolume CreateVolumeRecord"] != 2 {
|
||||
t.Fatal("duplicate at existing site not counted", got, err)
|
||||
}
|
||||
}
|
||||
@@ -8,58 +8,116 @@ import (
|
||||
"github.com/seaweedfs/seaweed-block/core/storage"
|
||||
)
|
||||
|
||||
// A new volume's primary hides its frontend until its replicas' stores are
|
||||
// recorded (the creation wait), so it answers the promotion probe "not
|
||||
// primary-ready" by design. The master must not take that for a failed
|
||||
// primary: past its boot grace, with a ready survivor, the line stays.
|
||||
// (Real-path symptom: r1 adopted at epoch 1, the master moved the primary
|
||||
// to r2 at epoch 2 while r1 was still learning its replicas' stores.)
|
||||
func TestPrimaryInTheCreationWaitIsNotReplacedForNotReady(t *testing.T) {
|
||||
// inCreationWait reports whether the master's store record still awaits a
|
||||
// replica store of vol-rf3 (test fixtures only: the gate itself reads the
|
||||
// primary's own answer).
|
||||
func inCreationWait(h *Host) bool {
|
||||
waiting, _ := h.attest.awaited("vol-rf3", h.replicaSlotsFor("vol-rf3"))
|
||||
return waiting > 0
|
||||
}
|
||||
|
||||
// awaitingProbe makes the current primary answer that it is not ready only
|
||||
// because its assignment at the current line's epoch awaits replica stores
|
||||
// (awaiting false: it does not say so).
|
||||
func awaitingProbe(t *testing.T, h *Host, awaiting bool) *switchProbe {
|
||||
t.Helper()
|
||||
p := probeOf(t, h)
|
||||
var epoch uint64
|
||||
if awaiting {
|
||||
epoch = waitAuthorityLine(t, h.Publisher(), "vol-rf3").Epoch
|
||||
}
|
||||
p.mu.Lock()
|
||||
p.awaitingEpoch = epoch
|
||||
p.mu.Unlock()
|
||||
return p
|
||||
}
|
||||
|
||||
// A new volume's primary serves nothing until its assignment carries every
|
||||
// replica's store, and its answer says so ("awaiting replica stores"). The
|
||||
// master must not take that for a failed primary: past its boot grace, with
|
||||
// a ready survivor, the line stays.
|
||||
func TestPrimaryAwaitingReplicaStoresIsNotReplacedForNotReady(t *testing.T) {
|
||||
h := newBootGraceMasterCreating(t, Config{ControllerConfig: authority.TopologyControllerConfig{PrimaryBootGrace: 200 * time.Millisecond}})
|
||||
defer closeTestMaster(t, h)
|
||||
if waiting, _ := h.attest.awaited("vol-rf3", h.replicaSlotsFor("vol-rf3")); waiting == 0 {
|
||||
awaitingProbe(t, h, true)
|
||||
time.Sleep(250 * time.Millisecond) // past the boot grace
|
||||
unsupportedTick(t, h, readySlot("r1-a"))
|
||||
expectLineStaysR1(t, h, "a primary awaiting replica stores answered not ready")
|
||||
unsupportedTick(t, h, readySlot("r1-a"))
|
||||
expectLineStaysR1(t, h, "still awaiting on the next tick")
|
||||
}
|
||||
|
||||
// The real-path schedule: the master has recorded every store (its wait is
|
||||
// over) but the primary has not received the re-sent assignment yet, so it
|
||||
// still answers "awaiting replica stores"; the master restarts in that gap.
|
||||
// The excuse is the primary's own answer, so nothing the master forgets on a
|
||||
// restart reopens the gap: the line stays.
|
||||
func TestMasterRestartInTheGapDoesNotReassign(t *testing.T) {
|
||||
cfg := Config{AuthorityStoreDir: t.TempDir(), LifecycleStoreDir: t.TempDir(),
|
||||
ControllerConfig: authority.TopologyControllerConfig{PrimaryBootGrace: 200 * time.Millisecond}}
|
||||
h := newBootGraceMasterCreating(t, cfg)
|
||||
attestAllStores(t, h) // the master's wait is over
|
||||
closeTestMaster(t, h)
|
||||
|
||||
cfg.Listen = "127.0.0.1:0"
|
||||
cfg.ControllerConfig.ExpectedSlotsPerVolume = 3
|
||||
cfg.Freshness.FreshnessWindow = testFreshness
|
||||
cfg.Freshness.PendingGrace = time.Millisecond
|
||||
h2, err := New(cfg)
|
||||
if err != nil {
|
||||
t.Fatalf("master restart: %v", err)
|
||||
}
|
||||
h2.Start()
|
||||
defer closeTestMaster(t, h2)
|
||||
h2.SetPromotionEvidenceProvider(&switchProbe{awaitingEpoch: waitAuthorityLine(t, h2.Publisher(), "vol-rf3").Epoch})
|
||||
if inCreationWait(h2) {
|
||||
t.Fatal("fixture: the restarted master still waits for stores")
|
||||
}
|
||||
time.Sleep(250 * time.Millisecond) // past the boot grace
|
||||
unsupportedTick(t, h2, readySlot("r1-a"))
|
||||
expectLineStaysR1(t, h2, "restarted master, primary still awaiting the re-sent stores")
|
||||
}
|
||||
|
||||
// A primary that is not ready for another reason (it does not say it awaits
|
||||
// replica stores) is replaced as before, also on a new volume.
|
||||
func TestPrimaryNotReadyForAnotherReasonIsReplaced(t *testing.T) {
|
||||
h := newBootGraceMasterCreating(t, Config{ControllerConfig: authority.TopologyControllerConfig{PrimaryBootGrace: 200 * time.Millisecond}})
|
||||
defer closeTestMaster(t, h)
|
||||
awaitingProbe(t, h, false)
|
||||
if !inCreationWait(h) {
|
||||
t.Fatal("fixture: the new volume is not in its creation wait")
|
||||
}
|
||||
time.Sleep(250 * time.Millisecond) // past the boot grace
|
||||
unsupportedTick(t, h, readySlot("r1-a"))
|
||||
expectLineStaysR1(t, h, "a primary in the creation wait answered not ready")
|
||||
unsupportedTick(t, h, readySlot("r1-a"))
|
||||
expectLineStaysR1(t, h, "still in the creation wait on the next tick")
|
||||
expectFailoverToR2(t, h, "a primary not ready without awaiting replica stores")
|
||||
}
|
||||
|
||||
// The creation wait never shelters a failed primary: one whose own fresh
|
||||
// slot is not acceptable (an unhealthy heartbeat makes it ineligible) is
|
||||
// replaced through the fencing round, as for an established volume.
|
||||
func TestPrimaryInTheCreationWaitIsReplacedWhenItsSlotIsNotAcceptable(t *testing.T) {
|
||||
h := newBootGraceMasterCreating(t, Config{})
|
||||
defer closeTestMaster(t, h)
|
||||
if !h.inCreationWait("vol-rf3") {
|
||||
t.Fatal("fixture: the new volume is not in its creation wait")
|
||||
}
|
||||
ineligible := restarting
|
||||
ineligible.eligible = false
|
||||
unsupportedTick(t, h, ineligible)
|
||||
expectFailoverToR2(t, h, "an ineligible primary inside the creation wait")
|
||||
}
|
||||
|
||||
// The wait clears while the probe is held (the master records the last
|
||||
// store meanwhile): the primary's not-ready answer was given inside the
|
||||
// wait and is judged as the wait, so this round does not fence it.
|
||||
func TestCreationWaitClearingDuringTheProbeDoesNotFence(t *testing.T) {
|
||||
// The answer names its line: one that says it awaits replica stores for
|
||||
// another epoch (a stale answer) excuses nothing, and the primary is
|
||||
// replaced as one not ready for another reason.
|
||||
func TestAwaitingAnswerForAnotherLineExcusesNothing(t *testing.T) {
|
||||
h := newBootGraceMasterCreating(t, Config{ControllerConfig: authority.TopologyControllerConfig{PrimaryBootGrace: 200 * time.Millisecond}})
|
||||
defer closeTestMaster(t, h)
|
||||
p := probeOf(t, h)
|
||||
p.mu.Lock()
|
||||
p.awaitingEpoch = waitAuthorityLine(t, h.Publisher(), "vol-rf3").Epoch + 1
|
||||
p.mu.Unlock()
|
||||
time.Sleep(250 * time.Millisecond) // past the boot grace
|
||||
heldTick(t, h, readySlot("r1-a"), func() {
|
||||
attestAllStores(t, h)
|
||||
// r1 keeps heartbeating while the probe runs: its slot stays
|
||||
// acceptable, so only the wait reading decides this round.
|
||||
ingestRF3Incarnations(t, h, readySlot("r1-a"), readySlot("r2-a"), silent)
|
||||
})
|
||||
if n := func() int { p.mu.Lock(); defer p.mu.Unlock(); return p.fenceCalls }(); n != 0 {
|
||||
t.Fatalf("%d fencing rounds on a not-ready answer given inside the creation wait", n)
|
||||
}
|
||||
expectLineStaysR1(t, h, "the wait cleared during the probe")
|
||||
unsupportedTick(t, h, readySlot("r1-a"))
|
||||
expectFailoverToR2(t, h, "an awaiting answer naming another line")
|
||||
}
|
||||
|
||||
// The answer never shelters a failed primary: one whose own fresh slot is
|
||||
// not acceptable (an unhealthy heartbeat makes it ineligible) is replaced
|
||||
// through the fencing round, as for an established volume.
|
||||
func TestPrimaryAwaitingReplicaStoresIsReplacedWhenItsSlotIsNotAcceptable(t *testing.T) {
|
||||
h := newBootGraceMasterCreating(t, Config{})
|
||||
defer closeTestMaster(t, h)
|
||||
awaitingProbe(t, h, true)
|
||||
ineligible := restarting
|
||||
ineligible.eligible = false
|
||||
unsupportedTick(t, h, ineligible)
|
||||
expectFailoverToR2(t, h, "an ineligible primary awaiting replica stores")
|
||||
}
|
||||
|
||||
// attestSomeStores records r1 and r2 but not r3: the volume is still in its
|
||||
@@ -70,19 +128,20 @@ func attestSomeStores(t *testing.T, h *Host) {
|
||||
if err := h.ingestStoreAttestation("node-a", attestation("vol-rf3", "r1", line.Epoch, map[string]storage.StoreID{"r1": testStoreID, "r2": testStoreID})); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !h.inCreationWait("vol-rf3") {
|
||||
if !inCreationWait(h) {
|
||||
t.Fatal("fixture: a partial attestation ended the creation wait")
|
||||
}
|
||||
}
|
||||
|
||||
// Partial attestation (still creating): a primary whose own slot is not
|
||||
// acceptable is replaced; one that does not answer the probe is unknown and
|
||||
// never replaced.
|
||||
// Partial attestation (still creating), the primary answering that it awaits
|
||||
// replica stores: a primary whose own slot is not acceptable is replaced;
|
||||
// one that does not answer the probe is unknown and never replaced.
|
||||
func TestCreationWaitPartialAttestationControls(t *testing.T) {
|
||||
t.Run("unhealthy primary (ineligible) is replaced", func(t *testing.T) {
|
||||
h := newBootGraceMasterCreating(t, Config{})
|
||||
defer closeTestMaster(t, h)
|
||||
attestSomeStores(t, h)
|
||||
awaitingProbe(t, h, true)
|
||||
ineligible := restarting
|
||||
ineligible.eligible = false
|
||||
unsupportedTick(t, h, ineligible)
|
||||
@@ -92,6 +151,7 @@ func TestCreationWaitPartialAttestationControls(t *testing.T) {
|
||||
h := newBootGraceMasterCreating(t, Config{})
|
||||
defer closeTestMaster(t, h)
|
||||
attestSomeStores(t, h)
|
||||
awaitingProbe(t, h, true)
|
||||
unsupportedTick(t, h, silent)
|
||||
expectFailoverToR2(t, h, "an expired primary inside the creation wait")
|
||||
})
|
||||
@@ -99,7 +159,7 @@ func TestCreationWaitPartialAttestationControls(t *testing.T) {
|
||||
h := newBootGraceMasterCreating(t, Config{})
|
||||
defer closeTestMaster(t, h)
|
||||
attestSomeStores(t, h)
|
||||
p := probeOf(t, h)
|
||||
p := awaitingProbe(t, h, true)
|
||||
p.mu.Lock()
|
||||
p.currentUnknown = true
|
||||
p.mu.Unlock()
|
||||
@@ -135,7 +195,7 @@ func TestCreationWaitEmptyVolumeOutcomes(t *testing.T) {
|
||||
h := newBootGraceMasterCreating(t, Config{})
|
||||
defer closeTestMaster(t, h)
|
||||
attestSomeStores(t, h)
|
||||
p := probeOf(t, h)
|
||||
p := awaitingProbe(t, h, true)
|
||||
p.mu.Lock()
|
||||
p.empty, p.currentUnknown = true, c.unknown
|
||||
p.mu.Unlock()
|
||||
@@ -145,7 +205,7 @@ func TestCreationWaitEmptyVolumeOutcomes(t *testing.T) {
|
||||
return
|
||||
}
|
||||
expectLineStaysR1(t, h, c.name)
|
||||
if !h.inCreationWait("vol-rf3") {
|
||||
if !inCreationWait(h) {
|
||||
t.Fatal("the volume left its creation wait without the missing store")
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,563 @@
|
||||
package master
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/seaweedfs/seaweed-block/core/adapter"
|
||||
"github.com/seaweedfs/seaweed-block/core/authority"
|
||||
"github.com/seaweedfs/seaweed-block/core/storage"
|
||||
)
|
||||
|
||||
// ackedFenceProbe is a fenceProbe that reports its ack profile, as the
|
||||
// round provider does (plannedMoveEvidence reads it).
|
||||
type ackedFenceProbe struct{ *fenceProbe }
|
||||
|
||||
func (p ackedFenceProbe) AckProfile() string { return p.plain.AckProfile }
|
||||
|
||||
// rf3LineOnR1 is a master whose RF3 volume's line is on r1, bound by a
|
||||
// product tick.
|
||||
func rf3LineOnR1(t *testing.T) (*Host, authority.AuthorityBasis) {
|
||||
t.Helper()
|
||||
return rf3LineOnR1With(t, newTestMasterWithControllerConfig(t, t.TempDir(), authority.TopologyControllerConfig{ExpectedSlotsPerVolume: 3}))
|
||||
}
|
||||
|
||||
func rf3LineOnR1With(t *testing.T, h *Host) (*Host, authority.AuthorityBasis) {
|
||||
t.Helper()
|
||||
h.SetPromotionEvidenceProvider(staticPromotionProbe{result: PromotionProbeResult{
|
||||
AckProfile: "sync_quorum",
|
||||
Candidates: []PromotionCandidateEvidence{{ReplicaID: "r2", Ready: true, DurableLSN: 1}, {ReplicaID: "r3", Ready: true, DurableLSN: 1}},
|
||||
}})
|
||||
seedRF3PlacementForServersWithAddrs(t, h, "vol-rf3", "node-a", "node-b", "node-c")
|
||||
ingestRF3Observation(t, h, true, true, true)
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
t.Fatalf("initial product tick: %v", err)
|
||||
}
|
||||
line := waitAuthorityLine(t, h.Publisher(), "vol-rf3")
|
||||
if line.ReplicaID != "r1" {
|
||||
t.Fatalf("initial line=%+v want r1", line)
|
||||
}
|
||||
return h, line
|
||||
}
|
||||
|
||||
func failoverTo(h *Host, current authority.AuthorityBasis, target string) error {
|
||||
return failoverVolumeTo(h, "vol-rf3", current, target)
|
||||
}
|
||||
|
||||
func failoverVolumeTo(h *Host, volumeID string, current authority.AuthorityBasis, target string) error {
|
||||
addr := map[string][2]string{"r2": {"127.0.0.1:19201", "127.0.0.1:19202"}, "r3": {"127.0.0.1:19301", "127.0.0.1:19302"}}[target]
|
||||
_, err := h.FailbackAuthorityRuntime().ExecuteFailback(context.Background(), authority.FailbackRuntimeRequest{
|
||||
VolumeID: volumeID, ReplicaID: target, TargetDataAddr: addr[0], TargetCtrlAddr: addr[1],
|
||||
ExpectedCurrentReplicaID: current.ReplicaID, ExpectedCurrentEpoch: current.Epoch,
|
||||
AckEligible: true, FrontendFencedBeforeFailback: true, DurableFrontierCovered: true, NoCrossVolumeIdentityChange: true,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
// The operator's failover of an RF3 sync_quorum volume whose primary is
|
||||
// unreachable (its host powered off: no fresh heartbeat) runs the fencing
|
||||
// round, which is the seal a planned move there lacks, and the
|
||||
// decision is the round's (Fence model Open/Answer/Decide). Survivors answer
|
||||
// at floor e+1, both of them (N-K+1 = 2), so the old primary can no longer
|
||||
// collect an acknowledgement; the target must hold the highest fenced end and
|
||||
// be ready; the published line carries basis Fenced at e+1. Anything less
|
||||
// publishes nothing and leaves the fence pending, so a returning primary is
|
||||
// healed at e+1 (the product loop's heal).
|
||||
func TestManualFailoverRF3SyncQuorumDecidesOnTheFencingRound(t *testing.T) {
|
||||
plain := PromotionProbeResult{AckProfile: "sync_quorum", SyncAckKnown: true, Candidates: []PromotionCandidateEvidence{
|
||||
{ReplicaID: "r2", Ready: true, DurableLSN: 10},
|
||||
{ReplicaID: "r3", Ready: true, DurableLSN: 9},
|
||||
}}
|
||||
at := func(r string, lsn uint64, floorAbove uint64, ready bool) PromotionCandidateEvidence {
|
||||
return PromotionCandidateEvidence{ReplicaID: r, Ready: ready, DurableLSN: lsn, Floor: floorAbove, TableValid: true}
|
||||
}
|
||||
for _, c := range []struct {
|
||||
name string
|
||||
target string
|
||||
fenced func(e uint64) func(authority.AuthorityBasis, []PromotionCandidateEvidence) (PromotionProbeResult, error)
|
||||
want uint64 // the promoted line's evidence LSN; 0 = refused
|
||||
}{
|
||||
{"both fenced; the target holds the highest fenced end", "r3",
|
||||
func(e uint64) func(authority.AuthorityBasis, []PromotionCandidateEvidence) (PromotionProbeResult, error) {
|
||||
return fencedAs(at("r2", 10, e+1, true), at("r3", 12, e+1, true))
|
||||
}, 12},
|
||||
{"the target is below the other survivor's fenced end", "r2",
|
||||
func(e uint64) func(authority.AuthorityBasis, []PromotionCandidateEvidence) (PromotionProbeResult, error) {
|
||||
return fencedAs(at("r2", 10, e+1, true), at("r3", 12, e+1, true))
|
||||
}, 0},
|
||||
{"one survivor silent: too few fenced answers", "r2",
|
||||
func(e uint64) func(authority.AuthorityBasis, []PromotionCandidateEvidence) (PromotionProbeResult, error) {
|
||||
return fencedAs(at("r2", 10, e+1, true))
|
||||
}, 0},
|
||||
{"one answered at a higher floor (superseded): not counted", "r2",
|
||||
func(e uint64) func(authority.AuthorityBasis, []PromotionCandidateEvidence) (PromotionProbeResult, error) {
|
||||
return fencedAs(at("r2", 10, e+1, true), at("r3", 9, e+2, true))
|
||||
}, 0},
|
||||
{"the target holds the highest end but is not ready", "r3",
|
||||
func(e uint64) func(authority.AuthorityBasis, []PromotionCandidateEvidence) (PromotionProbeResult, error) {
|
||||
return fencedAs(at("r2", 10, e+1, true), at("r3", 12, e+1, false))
|
||||
}, 0},
|
||||
{"the fencing round failed", "r2",
|
||||
func(uint64) func(authority.AuthorityBasis, []PromotionCandidateEvidence) (PromotionProbeResult, error) {
|
||||
return func(authority.AuthorityBasis, []PromotionCandidateEvidence) (PromotionProbeResult, error) {
|
||||
return PromotionProbeResult{}, errors.New("no stream")
|
||||
}
|
||||
}, 0},
|
||||
} {
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
h, line := rf3LineOnR1(t)
|
||||
defer closeTestMaster(t, h)
|
||||
ingestRF3Observation(t, h, false, true, true) // r1's host is gone
|
||||
p := &fenceProbe{plain: plain, fenced: c.fenced(line.Epoch)}
|
||||
h.SetPromotionEvidenceProvider(ackedFenceProbe{p})
|
||||
|
||||
err := failoverTo(h, line, c.target)
|
||||
if len(p.survivors) != 2 {
|
||||
t.Fatalf("fenced %v; want both survivors r2, r3 fenced before any decision", p.survivors)
|
||||
}
|
||||
after, _ := h.Publisher().VolumeAuthorityLine("vol-rf3")
|
||||
if c.want == 0 {
|
||||
if err == nil || after != line {
|
||||
t.Fatalf("err=%v line=%+v; want refused, line %+v unchanged", err, after, line)
|
||||
}
|
||||
if !h.pendingFence("vol-rf3", line.Epoch) {
|
||||
t.Fatal("a refused fenced failover left no pending fence: a returning primary would not be healed at e+1")
|
||||
}
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
t.Fatalf("failover to %s: %v", c.target, err)
|
||||
}
|
||||
if after.ReplicaID != c.target || after.Epoch != line.Epoch+1 {
|
||||
t.Fatalf("line=%+v; want %s at %d", after, c.target, line.Epoch+1)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// The evidence the fenced failover hands the publisher: kind PROMOTION,
|
||||
// basis Fenced, the round's epoch (e+1), the target's fenced end.
|
||||
func TestManualFailoverRF3EvidenceIsTheFencingRounds(t *testing.T) {
|
||||
h, line := rf3LineOnR1(t)
|
||||
defer closeTestMaster(t, h)
|
||||
ingestRF3Observation(t, h, false, true, true)
|
||||
p := &fenceProbe{
|
||||
plain: PromotionProbeResult{AckProfile: "sync_quorum", SyncAckKnown: true, Candidates: []PromotionCandidateEvidence{
|
||||
{ReplicaID: "r2", Ready: true, DurableLSN: 10}, {ReplicaID: "r3", Ready: true, DurableLSN: 12}}},
|
||||
fenced: fencedAs(
|
||||
PromotionCandidateEvidence{ReplicaID: "r2", Ready: true, DurableLSN: 10, Floor: line.Epoch + 1, TableValid: true},
|
||||
PromotionCandidateEvidence{ReplicaID: "r3", Ready: true, DurableLSN: 12, Floor: line.Epoch + 1, TableValid: true}),
|
||||
}
|
||||
h.SetPromotionEvidenceProvider(ackedFenceProbe{p})
|
||||
ev, err := h.plannedMoveEvidence("vol-rf3", "r3")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if ev.Kind != adapter.PrimaryKindPromotion || ev.Basis != adapter.BasisFenced || ev.FencedEpoch != line.Epoch+1 || ev.DurableLSN != 12 {
|
||||
t.Fatalf("evidence %+v; want PROMOTION, basis fenced at %d, end 12", ev, line.Epoch+1)
|
||||
}
|
||||
}
|
||||
|
||||
// rf2LineOnR1 is a master whose RF2 volume's line is on r1, bound by a
|
||||
// product tick under the given ack profile.
|
||||
func rf2LineOnR1(t *testing.T, profile string) (*Host, authority.AuthorityBasis) {
|
||||
t.Helper()
|
||||
h := newTestMasterWithControllerConfig(t, t.TempDir(), authority.TopologyControllerConfig{ExpectedSlotsPerVolume: 2})
|
||||
h.SetPromotionEvidenceProvider(staticPromotionProbe{result: PromotionProbeResult{
|
||||
AckProfile: profile,
|
||||
Candidates: []PromotionCandidateEvidence{{ReplicaID: "r2", Ready: true, DurableLSN: 1}},
|
||||
}})
|
||||
seedRF2Placement(t, h)
|
||||
ingestRF2Observation(t, h, true, true)
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
t.Fatalf("initial product tick: %v", err)
|
||||
}
|
||||
line := waitAuthorityLine(t, h.Publisher(), "vol-rf2")
|
||||
if line.ReplicaID != "r1" {
|
||||
t.Fatalf("initial line=%+v want r1", line)
|
||||
}
|
||||
return h, line
|
||||
}
|
||||
|
||||
// The operator's failover of an RF2 volume whose primary is unreachable (its
|
||||
// host powered off: no fresh heartbeat) is decided on the fencing round too,
|
||||
// one path with RF3 (Fence model Open/Answer/Decide; the count is a
|
||||
// parameter: RF2 needs the one survivor's answer). The survivor must answer
|
||||
// at floor e+1, on a valid table, ready; the line carries basis Fenced at
|
||||
// e+1. Anything less publishes nothing and leaves the fence pending.
|
||||
func TestManualFailoverRF2UnreachablePrimaryDecidesOnTheFencingRound(t *testing.T) {
|
||||
for _, profile := range []string{"sync_quorum", "sync_all"} {
|
||||
for _, c := range []struct {
|
||||
name string
|
||||
survivor func(e uint64) PromotionCandidateEvidence
|
||||
fail bool
|
||||
promoted bool
|
||||
}{
|
||||
{"the survivor fenced at e+1, ready", func(e uint64) PromotionCandidateEvidence {
|
||||
return PromotionCandidateEvidence{ReplicaID: "r2", Ready: true, DurableLSN: 5, Floor: e + 1, TableValid: true}
|
||||
}, false, true},
|
||||
{"the survivor answered at a higher floor (superseded)", func(e uint64) PromotionCandidateEvidence {
|
||||
return PromotionCandidateEvidence{ReplicaID: "r2", Ready: true, DurableLSN: 5, Floor: e + 2, TableValid: true}
|
||||
}, false, false},
|
||||
{"the survivor is not ready", func(e uint64) PromotionCandidateEvidence {
|
||||
return PromotionCandidateEvidence{ReplicaID: "r2", DurableLSN: 5, Floor: e + 1, TableValid: true}
|
||||
}, false, false},
|
||||
{"the survivor's table is invalid", func(e uint64) PromotionCandidateEvidence {
|
||||
return PromotionCandidateEvidence{ReplicaID: "r2", Ready: true, DurableLSN: 5, Floor: e + 1, TableInvalid: true}
|
||||
}, false, false},
|
||||
{"the fencing round failed", nil, true, false},
|
||||
} {
|
||||
t.Run(profile+"/"+c.name, func(t *testing.T) {
|
||||
h, line := rf2LineOnR1(t, profile)
|
||||
defer closeTestMaster(t, h)
|
||||
ingestRF2Observation(t, h, false, true) // r1's host is gone
|
||||
p := &fenceProbe{plain: PromotionProbeResult{AckProfile: profile, SyncAckKnown: true, Candidates: []PromotionCandidateEvidence{{ReplicaID: "r2", Ready: true, DurableLSN: 5}}}}
|
||||
if c.fail {
|
||||
p.fenced = func(authority.AuthorityBasis, []PromotionCandidateEvidence) (PromotionProbeResult, error) {
|
||||
return PromotionProbeResult{}, errors.New("no stream")
|
||||
}
|
||||
} else {
|
||||
p.fenced = fencedAs(c.survivor(line.Epoch))
|
||||
}
|
||||
h.SetPromotionEvidenceProvider(ackedFenceProbe{p})
|
||||
|
||||
if c.promoted {
|
||||
ev, err := h.plannedMoveEvidence("vol-rf2", "r2")
|
||||
if err != nil || ev.Basis != adapter.BasisFenced || ev.FencedEpoch != line.Epoch+1 || ev.DurableLSN != 5 {
|
||||
t.Fatalf("evidence %+v err=%v; want basis fenced at %d, end 5", ev, err, line.Epoch+1)
|
||||
}
|
||||
}
|
||||
err := failoverVolumeTo(h, "vol-rf2", line, "r2")
|
||||
if len(p.survivors) == 0 || p.survivors[len(p.survivors)-1] != "r2" {
|
||||
t.Fatalf("fenced %v; want the survivor r2 fenced before any decision", p.survivors)
|
||||
}
|
||||
after, _ := h.Publisher().VolumeAuthorityLine("vol-rf2")
|
||||
if !c.promoted {
|
||||
if err == nil || after != line {
|
||||
t.Fatalf("err=%v line=%+v; want refused, line %+v unchanged", err, after, line)
|
||||
}
|
||||
if !h.pendingFence("vol-rf2", line.Epoch) {
|
||||
t.Fatal("a refused fenced failover left no pending fence")
|
||||
}
|
||||
return
|
||||
}
|
||||
if err != nil || after.ReplicaID != "r2" || after.Epoch != line.Epoch+1 {
|
||||
t.Fatalf("err=%v line=%+v; want r2 at %d", err, after, line.Epoch+1)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// best_effort acknowledges a write without any replica, so no round can
|
||||
// prove the survivor holds every acknowledged write: the operator's failover
|
||||
// of an unreachable best_effort primary is refused (never basis Fenced),
|
||||
// and no fencing round runs.
|
||||
func TestManualFailoverRF2BestEffortIsNeverFenced(t *testing.T) {
|
||||
h, line := rf2LineOnR1(t, "best_effort")
|
||||
defer closeTestMaster(t, h)
|
||||
ingestRF2Observation(t, h, false, true)
|
||||
p := &fenceProbe{
|
||||
plain: PromotionProbeResult{AckProfile: "best_effort", Candidates: []PromotionCandidateEvidence{{ReplicaID: "r2", Ready: true, DurableLSN: 5}}},
|
||||
fenced: fencedAs(PromotionCandidateEvidence{ReplicaID: "r2", Ready: true, DurableLSN: 5, Floor: line.Epoch + 1, TableValid: true}),
|
||||
}
|
||||
h.SetPromotionEvidenceProvider(ackedFenceProbe{p})
|
||||
if _, err := h.plannedMoveEvidence("vol-rf2", "r2"); !errors.Is(err, ErrPlannedMoveBestEffort) || len(p.survivors) != 0 {
|
||||
t.Fatalf("err=%v fenced=%v; want ErrPlannedMoveBestEffort and no fencing round", err, p.survivors)
|
||||
}
|
||||
}
|
||||
|
||||
// An RF2 sync_quorum failover from a reachable primary stays a planned move
|
||||
// (its target is in every acknowledgement set): no fencing round, basis
|
||||
// Planned.
|
||||
func TestManualFailoverRF2ReachablePrimaryStaysPlanned(t *testing.T) {
|
||||
h, _ := rf2LineOnR1(t, "sync_quorum")
|
||||
defer closeTestMaster(t, h)
|
||||
p := &fenceProbe{
|
||||
plain: PromotionProbeResult{AckProfile: "sync_quorum", SyncAckKnown: true, Candidates: []PromotionCandidateEvidence{{ReplicaID: "r2", Ready: true, DurableLSN: 5}}},
|
||||
fenced: fencedAs(),
|
||||
}
|
||||
h.SetPromotionEvidenceProvider(ackedFenceProbe{p})
|
||||
ev, err := h.plannedMoveEvidence("vol-rf2", "r2")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if ev.Basis != adapter.BasisPlanned || ev.FencedEpoch != 0 || len(p.survivors) != 0 {
|
||||
t.Fatalf("evidence %+v fenced=%v; want a planned move with no fencing round", ev, p.survivors)
|
||||
}
|
||||
}
|
||||
|
||||
// A reachable RF3 sync_quorum primary's move is a planned move, and a planned
|
||||
// move there needs a seal v1 does not have: refused, with no fencing round.
|
||||
// Only the failover of an unreachable primary is fenced.
|
||||
func TestManualFailoverRF3ReachablePrimaryIsRefused(t *testing.T) {
|
||||
h, line := rf3LineOnR1(t)
|
||||
defer closeTestMaster(t, h)
|
||||
p := &fenceProbe{
|
||||
plain: PromotionProbeResult{AckProfile: "sync_quorum", SyncAckKnown: true, Candidates: []PromotionCandidateEvidence{{ReplicaID: "r2", Ready: true, DurableLSN: 10}, {ReplicaID: "r3", Ready: true, DurableLSN: 12}}},
|
||||
fenced: fencedAs(),
|
||||
}
|
||||
h.SetPromotionEvidenceProvider(ackedFenceProbe{p})
|
||||
err := failoverTo(h, line, "r3")
|
||||
if !errors.Is(err, ErrPlannedMoveNeedsSeal) || len(p.survivors) != 0 {
|
||||
t.Fatalf("err=%v fenced=%v; want ErrPlannedMoveNeedsSeal and no fencing round", err, p.survivors)
|
||||
}
|
||||
if after, _ := h.Publisher().VolumeAuthorityLine("vol-rf3"); after != line {
|
||||
t.Fatalf("line=%+v; want %+v unchanged", after, line)
|
||||
}
|
||||
}
|
||||
|
||||
// meetingFenceProbe holds each fencing round until two have arrived, so two
|
||||
// callers decide the same volume at the same time. A caller that waits past
|
||||
// the bound gets an error (no decision) and marks the probe late: the test
|
||||
// then fails, it never proceeds with one caller alone.
|
||||
type meetingFenceProbe struct {
|
||||
*fenceProbe
|
||||
mu sync.Mutex
|
||||
arrived int
|
||||
late bool
|
||||
bound time.Duration
|
||||
both chan struct{}
|
||||
}
|
||||
|
||||
func (p *meetingFenceProbe) FencePromotionCandidates(v string, current authority.AuthorityBasis, survivors []PromotionCandidateEvidence) (PromotionProbeResult, error) {
|
||||
p.mu.Lock()
|
||||
p.arrived++
|
||||
if p.arrived == 2 {
|
||||
close(p.both)
|
||||
}
|
||||
p.mu.Unlock()
|
||||
select {
|
||||
case <-p.both:
|
||||
case <-time.After(p.bound):
|
||||
p.mu.Lock()
|
||||
p.late = true
|
||||
p.mu.Unlock()
|
||||
return PromotionProbeResult{}, errors.New("meetingFenceProbe: the other caller did not arrive")
|
||||
}
|
||||
p.mu.Lock()
|
||||
defer p.mu.Unlock()
|
||||
return p.fenceProbe.FencePromotionCandidates(v, current, survivors)
|
||||
}
|
||||
|
||||
func (p *meetingFenceProbe) AckProfile() string { return p.plain.AckProfile }
|
||||
|
||||
// The operator's failover and the master's own promotion loop decide the
|
||||
// same volume at once: both fence at the same next epoch and both allow the
|
||||
// target, but exactly one line is published (the line's conditional update
|
||||
// refuses the second), so the epoch moves once.
|
||||
func TestManualFailoverAndThePromotionLoopPublishOneLine(t *testing.T) {
|
||||
h, line := rf3LineOnR1(t)
|
||||
defer closeTestMaster(t, h)
|
||||
ingestRF3Observation(t, h, false, true, true)
|
||||
e := line.Epoch
|
||||
p := &meetingFenceProbe{both: make(chan struct{}), bound: 5 * time.Second, fenceProbe: &fenceProbe{
|
||||
// The primary answered not ready: the loop's own promotion applies.
|
||||
plain: PromotionProbeResult{AckProfile: "sync_quorum", SyncAckKnown: true, CurrentKnown: true,
|
||||
Current: PromotionCandidateEvidence{ReplicaID: "r1"},
|
||||
Candidates: []PromotionCandidateEvidence{{ReplicaID: "r2", Ready: true, DurableLSN: 10}, {ReplicaID: "r3", Ready: true, DurableLSN: 12}}},
|
||||
fenced: fencedAs(
|
||||
PromotionCandidateEvidence{ReplicaID: "r2", Ready: true, DurableLSN: 10, Floor: e + 1, TableValid: true},
|
||||
PromotionCandidateEvidence{ReplicaID: "r3", Ready: true, DurableLSN: 12, Floor: e + 1, TableValid: true}),
|
||||
}}
|
||||
h.SetPromotionEvidenceProvider(p)
|
||||
|
||||
var wg sync.WaitGroup
|
||||
var opErr, loopErr error
|
||||
wg.Add(2)
|
||||
go func() { defer wg.Done(); opErr = failoverTo(h, line, "r3") }()
|
||||
go func() { defer wg.Done(); _, loopErr = h.RunLifecycleProductTick() }()
|
||||
wg.Wait()
|
||||
if loopErr != nil {
|
||||
t.Fatalf("product tick: %v", loopErr)
|
||||
}
|
||||
p.mu.Lock()
|
||||
met, late := p.arrived, p.late
|
||||
p.mu.Unlock()
|
||||
if met != 2 || late {
|
||||
t.Fatalf("%d fencing rounds, late=%t; want both callers held together before either decided", met, late)
|
||||
}
|
||||
after := waitAuthorityReplica(t, h.Publisher(), "vol-rf3", "r3")
|
||||
deadline := time.Now().Add(500 * time.Millisecond)
|
||||
for time.Now().Before(deadline) {
|
||||
if cur, _ := h.Publisher().VolumeAuthorityLine("vol-rf3"); cur.Epoch != e+1 || cur.ReplicaID != "r3" {
|
||||
t.Fatalf("line=%+v; want exactly one publication: r3 at %d (operator err=%v)", cur, e+1, opErr)
|
||||
}
|
||||
time.Sleep(20 * time.Millisecond)
|
||||
}
|
||||
if after.Epoch != e+1 {
|
||||
t.Fatalf("line=%+v; want r3 at %d", after, e+1)
|
||||
}
|
||||
}
|
||||
|
||||
// The barrier's negative control: with one caller only, the round is refused
|
||||
// at the bound and the probe is marked late, so a test that relies on two
|
||||
// callers held together cannot pass with one.
|
||||
func TestMeetingFenceProbeFailsWhenTheOtherCallerIsLate(t *testing.T) {
|
||||
p := &meetingFenceProbe{both: make(chan struct{}), bound: 50 * time.Millisecond, fenceProbe: &fenceProbe{fenced: fencedAs()}}
|
||||
if _, err := p.FencePromotionCandidates("v", authority.AuthorityBasis{Epoch: 1}, nil); err == nil || !p.late {
|
||||
t.Fatalf("err=%v late=%t; want a refusal and late", err, p.late)
|
||||
}
|
||||
}
|
||||
|
||||
// storeFault makes every authority record write of one volume fail (a
|
||||
// directory where the store writes the record's temp file; open fails
|
||||
// before any rename, as a full or failing disk would) until cleared.
|
||||
func storeFault(t *testing.T, h *Host, volumeID string) (arm, clear func()) {
|
||||
t.Helper()
|
||||
var record string
|
||||
matches, _ := filepath.Glob(filepath.Join(h.cfg.AuthorityStoreDir, volumeID+".*"))
|
||||
for _, m := range matches {
|
||||
if !strings.HasSuffix(m, ".tmp") {
|
||||
record = m
|
||||
}
|
||||
}
|
||||
if record == "" {
|
||||
t.Fatalf("no authority record for %s in %s (%v)", volumeID, h.cfg.AuthorityStoreDir, matches)
|
||||
}
|
||||
tmp := record + ".tmp"
|
||||
arm = func() {
|
||||
if err := os.Mkdir(tmp, 0o700); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
clear = func() { _ = os.Remove(tmp) }
|
||||
t.Cleanup(clear)
|
||||
return arm, clear
|
||||
}
|
||||
|
||||
// waitLine polls until the volume's line is replica at epoch, else fails.
|
||||
func waitLine(t *testing.T, h *Host, volumeID, replica string, epoch uint64) {
|
||||
t.Helper()
|
||||
deadline := time.Now().Add(3 * time.Second)
|
||||
for {
|
||||
cur, _ := h.Publisher().VolumeAuthorityLine(volumeID)
|
||||
if cur.ReplicaID == replica && cur.Epoch == epoch {
|
||||
return
|
||||
}
|
||||
if time.Now().After(deadline) {
|
||||
t.Fatalf("line=%+v; want %s at %d", cur, replica, epoch)
|
||||
}
|
||||
time.Sleep(20 * time.Millisecond)
|
||||
}
|
||||
}
|
||||
|
||||
// healedR1 is the line's own primary answering a heal round ready.
|
||||
var healedR1 = PromotionProbeResult{CurrentKnown: true, Current: PromotionCandidateEvidence{ReplicaID: "r1", Ready: true, DurableLSN: 11,
|
||||
LastDataEpoch: 1, LastDataFirstLSN: 1, StoreID: storage.StoreID{7}, TableValid: true}}
|
||||
|
||||
// back puts r1 back ready and the fenced survivors not ready for primary
|
||||
// (they refuse r1 at e); with r3Missing its server reports no slot for the
|
||||
// volume (a partial inventory: the volume is unsupported).
|
||||
func back(t *testing.T, h *Host, r3Missing bool) {
|
||||
t.Helper()
|
||||
now := time.Now().UTC()
|
||||
slot := func(r, d, c string, ready bool) []authority.SlotFact {
|
||||
return []authority.SlotFact{{VolumeID: "vol-rf3", ReplicaID: r, DataAddr: d, CtrlAddr: c, Reachable: true, ReadyForPrimary: ready, Eligible: true, EvidenceScore: 10}}
|
||||
}
|
||||
r3 := slot("r3", "127.0.0.1:19301", "127.0.0.1:19302", false)
|
||||
if r3Missing {
|
||||
r3 = nil
|
||||
}
|
||||
for _, obs := range []authority.Observation{
|
||||
{ServerID: "node-a", ObservedAt: now, Server: authority.ServerFact{Reachable: true, Eligible: true}, Slots: slot("r1", "127.0.0.1:19101", "127.0.0.1:19102", true)},
|
||||
{ServerID: "node-b", ObservedAt: now, Server: authority.ServerFact{Reachable: true, Eligible: true}, Slots: slot("r2", "127.0.0.1:19201", "127.0.0.1:19202", false)},
|
||||
{ServerID: "node-c", ObservedAt: now, Server: authority.ServerFact{Reachable: true, Eligible: true}, Slots: r3},
|
||||
} {
|
||||
if err := h.ObservationHost().Ingest(obs); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// End to end: the operator's failover is allowed by its fencing round, and
|
||||
// the publication fails (the authority store refuses the write). The line is
|
||||
// still r1 at e, but its survivors are fenced at e+1. When r1 is back, a
|
||||
// normal product tick publishes r1 at e+1 (the heal, through the same
|
||||
// dispatch as every tick), and a further tick adds no epoch.
|
||||
func TestManualFailoverPublicationFailureIsHealedByTheNextTick(t *testing.T) {
|
||||
h, line := rf3LineOnR1(t)
|
||||
defer closeTestMaster(t, h)
|
||||
ingestRF3Observation(t, h, false, true, true)
|
||||
e := line.Epoch
|
||||
p := &fenceProbe{
|
||||
plain: PromotionProbeResult{AckProfile: "sync_quorum", SyncAckKnown: true, Candidates: []PromotionCandidateEvidence{{ReplicaID: "r2", Ready: true, DurableLSN: 10}, {ReplicaID: "r3", Ready: true, DurableLSN: 12}}},
|
||||
fenced: fencedAs(
|
||||
PromotionCandidateEvidence{ReplicaID: "r2", Ready: true, DurableLSN: 10, Floor: e + 1, TableValid: true},
|
||||
PromotionCandidateEvidence{ReplicaID: "r3", Ready: true, DurableLSN: 12, Floor: e + 1, TableValid: true}),
|
||||
}
|
||||
h.SetPromotionEvidenceProvider(ackedFenceProbe{p})
|
||||
arm, clear := storeFault(t, h, "vol-rf3")
|
||||
arm()
|
||||
if err := failoverTo(h, line, "r3"); err == nil {
|
||||
t.Fatal("the failover published through a failing authority store")
|
||||
}
|
||||
clear()
|
||||
if cur, _ := h.Publisher().VolumeAuthorityLine("vol-rf3"); cur != line || len(p.survivors) != 2 {
|
||||
t.Fatalf("after the fault line=%+v fenced=%v; want %+v unchanged and both survivors fenced", cur, p.survivors, line)
|
||||
}
|
||||
|
||||
back(t, h, false)
|
||||
p.heal = healedR1
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
t.Fatalf("product tick: %v", err)
|
||||
}
|
||||
waitLine(t, h, "vol-rf3", "r1", e+1)
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
t.Fatalf("product tick: %v", err)
|
||||
}
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
waitLine(t, h, "vol-rf3", "r1", e+1)
|
||||
}
|
||||
|
||||
// The unsupported path: the operator's failover is refused (the target is
|
||||
// below the highest fenced end), so its survivors are fenced at e+1 and
|
||||
// nothing is published. r1 is back while the volume is unsupported (a
|
||||
// partial inventory: the report is built as the other unsupported-gate tests
|
||||
// build it). The gate's heal ask goes through the tick's own dispatch
|
||||
// (SubmitAssignmentAsk) and r1 is published at e+1; a further gate pass
|
||||
// asks nothing (the pending fence is cleared by that line).
|
||||
func TestManualFailoverRefusedFenceIsHealedAndPublishedOnTheUnsupportedPath(t *testing.T) {
|
||||
h, line := rf3LineOnR1(t)
|
||||
defer closeTestMaster(t, h)
|
||||
ingestRF3Observation(t, h, false, true, true)
|
||||
e := line.Epoch
|
||||
p := &fenceProbe{
|
||||
plain: PromotionProbeResult{AckProfile: "sync_quorum", SyncAckKnown: true, Candidates: []PromotionCandidateEvidence{{ReplicaID: "r2", Ready: true, DurableLSN: 10}, {ReplicaID: "r3", Ready: true, DurableLSN: 12}}},
|
||||
fenced: fencedAs(
|
||||
PromotionCandidateEvidence{ReplicaID: "r2", Ready: true, DurableLSN: 10, Floor: e + 1, TableValid: true},
|
||||
PromotionCandidateEvidence{ReplicaID: "r3", Ready: true, DurableLSN: 12, Floor: e + 1, TableValid: true}),
|
||||
}
|
||||
h.SetPromotionEvidenceProvider(ackedFenceProbe{p})
|
||||
if err := failoverTo(h, line, "r2"); err == nil {
|
||||
t.Fatal("a failover to the survivor below the highest fenced end was allowed")
|
||||
}
|
||||
|
||||
back(t, h, true)
|
||||
p.plain = PromotionProbeResult{AckProfile: "sync_quorum", SyncAckKnown: true, CurrentKnown: true, Current: PromotionCandidateEvidence{ReplicaID: "r1", Ready: true},
|
||||
Candidates: []PromotionCandidateEvidence{{ReplicaID: "r2", DurableLSN: 10}}}
|
||||
p.heal = healedR1
|
||||
report := authority.SupportabilityReport{Unsupported: map[string]authority.VolumeUnsupportedEvidence{
|
||||
"vol-rf3": {VolumeID: "vol-rf3", Reasons: []string{authority.ReasonPartialInventory}},
|
||||
}}
|
||||
_, _, asks := h.applyUnsupportedPromotionEvidenceGate(h.Lifecycle().Placements.ListPlacements(), report, nil)
|
||||
if len(asks) != 1 {
|
||||
t.Fatalf("asks %+v; want the heal of r1", asks)
|
||||
}
|
||||
for _, a := range asks {
|
||||
if err := h.ctrl.SubmitAssignmentAsk(a); err != nil {
|
||||
t.Fatalf("dispatch %+v: %v", a, err)
|
||||
}
|
||||
}
|
||||
waitLine(t, h, "vol-rf3", "r1", e+1)
|
||||
if _, _, again := h.applyUnsupportedPromotionEvidenceGate(h.Lifecycle().Placements.ListPlacements(), report, nil); len(again) != 0 {
|
||||
t.Fatalf("a second pass asks %+v; want none (the line reached the fenced epoch)", again)
|
||||
}
|
||||
waitLine(t, h, "vol-rf3", "r1", e+1)
|
||||
}
|
||||
@@ -3,10 +3,12 @@ package master
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/seaweedfs/seaweed-block/core/adapter"
|
||||
"github.com/seaweedfs/seaweed-block/core/authority"
|
||||
"github.com/seaweedfs/seaweed-block/core/lifecycle"
|
||||
)
|
||||
|
||||
// ErrPlannedMoveNeedsSeal: under this ack profile and replica count a write
|
||||
@@ -71,7 +73,16 @@ func (h *Host) plannedMoveEvidence(volumeID, target string) (adapter.PrimaryEvid
|
||||
targetServer = s.ServerID
|
||||
}
|
||||
}
|
||||
if err := plannedMoveAllowed(profile, len(placement.Slots)); err != nil {
|
||||
// The primary is unreachable (a lost host stops heartbeating): the move
|
||||
// is the operator's failover, not a planned move from a live primary, and
|
||||
// it is decided on the fencing round at every replica count, where the
|
||||
// planned guard refuses only for want of a seal. A reachable primary's
|
||||
// move stays a planned move under its guard.
|
||||
if err := plannedMoveAllowed(profile, len(placement.Slots)); err != nil && !errors.Is(err, ErrPlannedMoveNeedsSeal) {
|
||||
return adapter.PrimaryEvidence{}, err
|
||||
} else if h.primaryUnreachable(volumeID) {
|
||||
return h.fencedMoveEvidence(volumeID, target, profile, placement.Slots)
|
||||
} else if err != nil {
|
||||
return adapter.PrimaryEvidence{}, err
|
||||
}
|
||||
result, err := prober.ProbePromotionCandidates(volumeID, authority.AuthorityBasis{}, []authority.ReplicaCandidate{{ReplicaID: target, ServerID: targetServer}})
|
||||
@@ -87,3 +98,59 @@ func (h *Host) plannedMoveEvidence(volumeID, target string) (adapter.PrimaryEvid
|
||||
}
|
||||
return adapter.PrimaryEvidence{}, fmt.Errorf("planned move: replica %s did not answer the probe round ready (caught up, epoch table valid)", target)
|
||||
}
|
||||
|
||||
// primaryUnreachable: the line's primary has no fresh, reachable heartbeat
|
||||
// slot. A volume without a line has no primary to lose.
|
||||
func (h *Host) primaryUnreachable(volumeID string) bool {
|
||||
current, ok := h.Publisher().VolumeAuthorityLine(volumeID)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
slot, fresh := h.freshCurrentSlot(volumeID, current.ReplicaID)
|
||||
return !fresh || !slot.Reachable
|
||||
}
|
||||
|
||||
// fencedMoveEvidence is the operator's failover of an unreachable primary,
|
||||
// at any replica count. The fencing round seals the old primary: every other replica is fenced at the line's
|
||||
// next epoch, so the old primary, dead or alive, can no longer collect an
|
||||
// acknowledgement, and the decision is read from the round alone
|
||||
// (fencedDecision: enough counted answers, the target holds the highest
|
||||
// fenced end and is ready). A round that does not allow the target publishes
|
||||
// nothing and leaves the fence pending, so a primary that answers again is
|
||||
// continued at e+1 (healAfterFailedFence) by the product loop.
|
||||
func (h *Host) fencedMoveEvidence(volumeID, target, profile string, slots []lifecycle.PlacementSlotIntent) (adapter.PrimaryEvidence, error) {
|
||||
current, ok := h.Publisher().VolumeAuthorityLine(volumeID)
|
||||
if !ok {
|
||||
return adapter.PrimaryEvidence{}, fmt.Errorf("fenced move: volume %s has no authority line", volumeID)
|
||||
}
|
||||
h.promotionMu.RLock()
|
||||
prober := h.promotionProber
|
||||
h.promotionMu.RUnlock()
|
||||
var candidates []authority.ReplicaCandidate
|
||||
for _, s := range slots {
|
||||
if s.ReplicaID != current.ReplicaID {
|
||||
candidates = append(candidates, authority.ReplicaCandidate{ReplicaID: s.ReplicaID, ServerID: s.ServerID})
|
||||
}
|
||||
}
|
||||
plain, err := prober.ProbePromotionCandidates(volumeID, current, candidates)
|
||||
if err != nil {
|
||||
return adapter.PrimaryEvidence{}, fmt.Errorf("fenced move: probe round: %w", err)
|
||||
}
|
||||
if plain.AckProfile == "" {
|
||||
plain.AckProfile = profile
|
||||
}
|
||||
// Pending from the attempt on: the round may fence survivors above the
|
||||
// line whatever it decides, and an allowed decision may still fail to
|
||||
// publish. It is forgotten once a line reaches that epoch.
|
||||
h.noteFencePending(volumeID, current.Epoch+1)
|
||||
fenced, allowed := h.fencedDecision(volumeID, current, plain, len(candidates))
|
||||
if allowed[target] {
|
||||
return promotionEvidenceFor(fenced, target), nil
|
||||
}
|
||||
others := make([]string, 0, len(allowed))
|
||||
for r := range allowed {
|
||||
others = append(others, r)
|
||||
}
|
||||
sort.Strings(others)
|
||||
return adapter.PrimaryEvidence{}, fmt.Errorf("fenced move: the fencing round at epoch %d does not allow %s (allowed: %v): it must hold the highest fenced end and be ready, with enough fenced survivors", current.Epoch+1, target, others)
|
||||
}
|
||||
@@ -75,6 +75,9 @@ type switchProbe struct {
|
||||
// empty: a new volume, never written: every end is zero and no frontier
|
||||
// is required.
|
||||
empty bool
|
||||
// awaitingEpoch: the current primary answers that it is not ready only
|
||||
// because its assignment at this epoch awaits replica stores (0: no).
|
||||
awaitingEpoch uint64
|
||||
// When hold is set, a probe signals entered and then blocks until
|
||||
// release is closed.
|
||||
hold bool
|
||||
@@ -109,7 +112,7 @@ func (p *switchProbe) ProbePromotionCandidates(volumeID string, current authorit
|
||||
return PromotionProbeResult{
|
||||
AckProfile: "sync-quorum",
|
||||
CurrentKnown: !p.currentUnknown,
|
||||
Current: PromotionCandidateEvidence{ReplicaID: "r1", Ready: p.currentReady},
|
||||
Current: PromotionCandidateEvidence{ReplicaID: "r1", Ready: p.currentReady, AwaitingReplicaStoresEpoch: p.awaitingEpoch},
|
||||
Candidates: []PromotionCandidateEvidence{{ReplicaID: "r2", Ready: true}, {ReplicaID: "r3"}},
|
||||
}, nil
|
||||
}
|
||||
@@ -119,7 +122,7 @@ func (p *switchProbe) ProbePromotionCandidates(volumeID string, current authorit
|
||||
// covers (#181); r3 answers but lags. A fencing round counts both.
|
||||
SyncAckLSN: 70,
|
||||
CurrentKnown: !p.currentUnknown,
|
||||
Current: PromotionCandidateEvidence{ReplicaID: "r1", Ready: p.currentReady, DurableLSN: 70},
|
||||
Current: PromotionCandidateEvidence{ReplicaID: "r1", Ready: p.currentReady, AwaitingReplicaStoresEpoch: p.awaitingEpoch, DurableLSN: 70},
|
||||
Candidates: []PromotionCandidateEvidence{{ReplicaID: "r2", Ready: true, DurableLSN: 70}, {ReplicaID: "r3", DurableLSN: p.lagEnd()}},
|
||||
}, nil
|
||||
}
|
||||
@@ -171,8 +174,12 @@ func newBootGraceMaster(t *testing.T, cfg Config) *Host {
|
||||
// creation wait (no store attested).
|
||||
func newBootGraceMasterCreating(t *testing.T, cfg Config) *Host {
|
||||
t.Helper()
|
||||
cfg.AuthorityStoreDir = t.TempDir()
|
||||
cfg.LifecycleStoreDir = t.TempDir()
|
||||
if cfg.AuthorityStoreDir == "" {
|
||||
cfg.AuthorityStoreDir = t.TempDir()
|
||||
}
|
||||
if cfg.LifecycleStoreDir == "" {
|
||||
cfg.LifecycleStoreDir = t.TempDir()
|
||||
}
|
||||
cfg.Listen = "127.0.0.1:0"
|
||||
cfg.ControllerConfig.ExpectedSlotsPerVolume = 3
|
||||
if cfg.Freshness.FreshnessWindow == 0 {
|
||||
@@ -205,7 +212,7 @@ func attestAllStores(t *testing.T, h *Host) {
|
||||
if err := h.ingestStoreAttestation("node-a", attestation("vol-rf3", "r1", line.Epoch, map[string]storage.StoreID{"r1": testStoreID, "r2": testStoreID, "r3": testStoreID})); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if h.inCreationWait("vol-rf3") {
|
||||
if inCreationWait(h) {
|
||||
t.Fatal("fixture: still in the creation wait after the attestation")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ done:
|
||||
}
|
||||
// The current primary's own evidence (a heal continues it on it):
|
||||
// ready as a serving primary, on a valid table.
|
||||
result.Current = PromotionCandidateEvidence{ReplicaID: current.ReplicaID, Ready: a.GetPrimaryReady(), DurableLSN: a.GetDurableEnd(),
|
||||
result.Current = PromotionCandidateEvidence{ReplicaID: current.ReplicaID, Ready: a.GetPrimaryReady(), AwaitingReplicaStoresEpoch: a.GetAwaitingReplicaStoresEpoch(), DurableLSN: a.GetDurableEnd(),
|
||||
LastDataEpoch: a.GetLastDataEpoch(), LastDataFirstLSN: a.GetLastDataFirstLsn(), TableInvalid: a.GetTablePresent() && !a.GetTableValid(), TableValid: a.GetTablePresent() && a.GetTableValid(),
|
||||
StoreID: store, Floor: a.GetFloor()}
|
||||
} else {
|
||||
|
||||
@@ -141,3 +141,26 @@ func TestProbeRound_ALateAnswerAfterTheRoundClosedIsDropped(t *testing.T) {
|
||||
t.Fatal("an answer after its round closed was delivered")
|
||||
}
|
||||
}
|
||||
|
||||
// The primary's own report crosses the wire into the gate's evidence: a
|
||||
// current primary that answers not ready because its assignment at epoch 3
|
||||
// awaits replica stores is carried as such (and only from this round's
|
||||
// answer of the asked node).
|
||||
func TestProbeRound_CarriesThePrimarysAwaitingStoresEpoch(t *testing.T) {
|
||||
hub := newProbeHub()
|
||||
servers := map[string]string{"r1": "s1", "r2": "s2"}
|
||||
p := &roundEvidenceProvider{hub: hub, serverOf: func(_, r string) string { return servers[r] }, ackProfile: "sync-quorum", wait: 300 * time.Millisecond, attested: attestedAs}
|
||||
roundNode(t, hub, "s1", func(r *control.ProbeRound) *control.ProbeAnswer {
|
||||
a := readyAnswer("s1")(r)
|
||||
a.ReplicaReady, a.PrimaryReady, a.AwaitingReplicaStoresEpoch = false, false, 3
|
||||
return a
|
||||
})
|
||||
roundNode(t, hub, "s2", readyAnswer("s2"))
|
||||
res, err := p.ProbePromotionCandidates("v1", authority.AuthorityBasis{ReplicaID: "r1", Epoch: 3}, []authority.ReplicaCandidate{{ReplicaID: "r2", ServerID: "s2"}})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !res.CurrentKnown || res.Current.Ready || res.Current.AwaitingReplicaStoresEpoch != 3 {
|
||||
t.Fatalf("current %+v known=%t; want not ready, awaiting replica stores at epoch 3", res.Current, res.CurrentKnown)
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,10 @@ type LifecycleProductTickResult struct {
|
||||
type PromotionCandidateEvidence struct {
|
||||
ReplicaID string
|
||||
Ready bool
|
||||
// AwaitingReplicaStoresEpoch: the primary answered not ready only because
|
||||
// its assignment at this epoch still awaits replica stores (its own
|
||||
// report); 0: not awaiting.
|
||||
AwaitingReplicaStoresEpoch uint64
|
||||
DurableLSN uint64
|
||||
ProbeAddr string
|
||||
// LastDataEpoch and LastDataFirstLSN are the candidate's epoch-table row
|
||||
@@ -525,6 +529,17 @@ func (h *Host) applyUnsupportedPromotionEvidenceGate(placements []lifecycle.Plac
|
||||
// and every start counts toward flap history (#128). The
|
||||
// promotion rules below are unchanged.
|
||||
h.recordCurrentBootFact(placement.VolumeID)
|
||||
// A fencing round fenced survivors above this line and nothing was
|
||||
// published (e.g. the operator's refused failover): continue the
|
||||
// line's own primary at e+1 when it is back and answers ready,
|
||||
// before any candidate check, as the supported gate does.
|
||||
if line, ok := h.Publisher().VolumeAuthorityLine(placement.VolumeID); ok && line.Assigned &&
|
||||
h.pendingFence(placement.VolumeID, line.Epoch) && h.freshPrimaryAcceptable(placement.VolumeID, line.ReplicaID) {
|
||||
if heal, healed := h.healAfterFailedFence(placement.VolumeID, line); healed {
|
||||
directAsks = append(directAsks, heal)
|
||||
continue
|
||||
}
|
||||
}
|
||||
if len(placement.Slots) < 2 || !placementIsConcreteExistingReplica(placement) || !unsupportedReasonsAllowPromotionProbe(evidence.Reasons) {
|
||||
continue
|
||||
}
|
||||
@@ -800,23 +815,21 @@ func (h *Host) probePromotionCandidates(volumeID string, current authority.Autho
|
||||
// legitimate failover.
|
||||
func (h *Host) probePromotionCandidatesCurrent(volumeID string, current authority.AuthorityBasis, candidates []authority.ReplicaCandidate) (PromotionProbeResult, bool) {
|
||||
before, beforeOK := h.freshCurrentSlot(volumeID, current.ReplicaID)
|
||||
// Read before the probe: the state the primary's answer is given in. If
|
||||
// the wait clears while the probe runs, the not-ready answer still
|
||||
// belongs to the wait; the next round judges the established volume.
|
||||
creating := h.inCreationWait(volumeID)
|
||||
result, ok := h.probePromotionCandidates(volumeID, current, candidates)
|
||||
if !ok || (result.CurrentKnown && result.Current.Ready) {
|
||||
return result, ok
|
||||
}
|
||||
after, afterOK := h.freshCurrentSlot(volumeID, current.ReplicaID)
|
||||
// A new volume's primary hides its frontend until the master has
|
||||
// recorded every replica's store (the creation wait), so it answers "not
|
||||
// primary-ready" by design. That answer is the wait, not a failure: the
|
||||
// primary is judged ready for this decision, but only while its own fresh
|
||||
// slot is acceptable. One that is unreachable, ineligible (an unhealthy
|
||||
// heartbeat) or withdrawn is replaced as for an established volume.
|
||||
if result.CurrentKnown && afterOK && after.Reachable && after.Eligible && !after.Withdrawn && creating {
|
||||
h.log.Printf("blockmaster: promotion gate volume=%s current=%s not frontend-ready inside the creation wait; judged ready", volumeID, current.ReplicaID)
|
||||
// A new volume's primary serves nothing until its assignment carries
|
||||
// every replica's store (the creation wait), and it says so in its
|
||||
// answer. That not-ready answer is the wait, not a failure: the primary
|
||||
// is judged ready for this decision, but only while its own fresh slot is
|
||||
// acceptable. One that is unreachable, ineligible (an unhealthy
|
||||
// heartbeat) or withdrawn is replaced as for an established volume. The
|
||||
// primary owns this fact; the master keeps no state for it.
|
||||
if result.CurrentKnown && current.Epoch != 0 && result.Current.AwaitingReplicaStoresEpoch == current.Epoch &&
|
||||
afterOK && after.Reachable && after.Eligible && !after.Withdrawn {
|
||||
h.log.Printf("blockmaster: promotion gate volume=%s current=%s not ready, awaiting replica stores (its own answer); judged ready", volumeID, current.ReplicaID)
|
||||
result.Current.Ready = true
|
||||
return result, ok
|
||||
}
|
||||
@@ -1028,16 +1041,6 @@ func (h *Host) assignmentAskAlreadyCurrent(volumeID, replicaID, dataAddr, ctrlAd
|
||||
// fresh heartbeat slot read now: placeable by that report and inside its
|
||||
// boot grace (#128). No fresh slot, or an explicit unhealthy report
|
||||
// (unreachable, ineligible, withdrawn), never holds.
|
||||
// inCreationWait reports whether the master still awaits the stores of a
|
||||
// new volume's replicas (its primary serves nothing until then).
|
||||
func (h *Host) inCreationWait(volumeID string) bool {
|
||||
if h.attest == nil {
|
||||
return false
|
||||
}
|
||||
waiting, _ := h.attest.awaited(volumeID, h.replicaSlotsFor(volumeID))
|
||||
return waiting > 0
|
||||
}
|
||||
|
||||
func (h *Host) primaryBootGraceHoldsNow(volumeID, replicaID string) bool {
|
||||
if h.ctrl == nil {
|
||||
return false
|
||||
@@ -1066,6 +1069,13 @@ func (h *Host) recordCurrentBootFact(volumeID string) {
|
||||
|
||||
// freshCurrentSlot returns the replica's own fresh heartbeat slot from
|
||||
// the observation store (server facts folded in).
|
||||
// freshPrimaryAcceptable: the replica has a fresh heartbeat slot that is
|
||||
// reachable, eligible and not withdrawn.
|
||||
func (h *Host) freshPrimaryAcceptable(volumeID, replicaID string) bool {
|
||||
s, ok := h.freshCurrentSlot(volumeID, replicaID)
|
||||
return ok && s.Reachable && s.Eligible && !s.Withdrawn
|
||||
}
|
||||
|
||||
func (h *Host) freshCurrentSlot(volumeID, replicaID string) (authority.ReplicaCandidate, bool) {
|
||||
if h.obs == nil {
|
||||
return authority.ReplicaCandidate{}, false
|
||||
|
||||
@@ -168,9 +168,9 @@ type Host struct {
|
||||
// even on a host that was healthy at its prior epoch; only a later
|
||||
// successful role call for the current role and epoch clears it.
|
||||
roleAdmissionFailed atomic.Value // string reason; "" = not failed
|
||||
// storesAwaited: the primary fact's (awaited<<32 | initial) replica
|
||||
// store count (ReplicaStoresAwaited).
|
||||
storesAwaited atomic.Uint64
|
||||
// storeWait: the primary fact's replica-store wait (ReplicaStoresAwaited,
|
||||
// awaitingStoresEpoch), one value under its own lock.
|
||||
storeWait storeWait
|
||||
// roleRetry: the last replica role call failed with an error a retry
|
||||
// may outlast (a floor that could not be persisted); runRoleRetry
|
||||
// re-applies the current role until it succeeds or is refused for good.
|
||||
@@ -1092,7 +1092,12 @@ func (h *Host) applyFact(fact *control.AssignmentFact) {
|
||||
}
|
||||
|
||||
h.recordSelfAssignment(fact)
|
||||
h.noteReplicaStores(fact)
|
||||
// A fact that awaits replica stores closes the frontend at once; one
|
||||
// that carries them all opens it only after the peers' expected stores
|
||||
// are installed (below), so no write is served before its peers count.
|
||||
if fact.GetReplicaStoresAwaited() > 0 {
|
||||
h.noteReplicaStores(fact)
|
||||
}
|
||||
h.reportAssignmentEndpoints(fact)
|
||||
|
||||
// The recovery watchdog runs from the primary assignment, before any
|
||||
@@ -1169,6 +1174,7 @@ func (h *Host) applyFact(fact *control.AssignmentFact) {
|
||||
h.log.Printf("blockvolume: volume %s replication UpdateReplicaSet ok (gen=%d, peers=%d): %v",
|
||||
h.cfg.VolumeID, gen, len(targets), peerIDs)
|
||||
}
|
||||
h.noteReplicaStores(fact)
|
||||
|
||||
// Step (2c): identity install only after replication is live.
|
||||
// SOLE permitted decode path. See subscribe.go.
|
||||
|
||||
@@ -148,8 +148,18 @@ func (h *Host) probeAnswer(round uint64) *control.ProbeAnswer {
|
||||
a.StoreId = id[:]
|
||||
}
|
||||
}
|
||||
// The wait is read BEFORE readiness: if it held, a not-ready answer read
|
||||
// after is the wait (the frontend gate reads the same value); if it no
|
||||
// longer held, a not-ready answer has another cause and says nothing.
|
||||
awaiting := h.awaitingStoresEpoch()
|
||||
if roles, ok := h.probeRoles.Load().(probeRoleSource); ok && roles != nil {
|
||||
a.ReplicaReady, a.PrimaryReady = roles()
|
||||
}
|
||||
// Not serving only because the creation wait of this line still holds:
|
||||
// said so, with the line's epoch, so the master does not take the
|
||||
// not-ready answer for a failure (and no other line can borrow it).
|
||||
if !a.PrimaryReady {
|
||||
a.AwaitingReplicaStoresEpoch = awaiting
|
||||
}
|
||||
return a
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/seaweedfs/seaweed-block/core/engine"
|
||||
"github.com/seaweedfs/seaweed-block/core/replication"
|
||||
"github.com/seaweedfs/seaweed-block/core/frontend"
|
||||
"github.com/seaweedfs/seaweed-block/core/frontend/durable"
|
||||
"github.com/seaweedfs/seaweed-block/core/storage/memorywal"
|
||||
@@ -74,3 +75,102 @@ func TestReplicaStoresWaitOnlyWhereStoresAreRequired(t *testing.T) {
|
||||
t.Fatalf("a host without a store-requiring slot waits: %q", reason)
|
||||
}
|
||||
}
|
||||
|
||||
// The probe answer says the primary awaits replica stores with the epoch
|
||||
// of the line whose assignment awaits them; a new line (another epoch) that
|
||||
// never waited says nothing.
|
||||
func TestProbeAnswerNamesTheLineAwaitingReplicaStores(t *testing.T) {
|
||||
h, _, rep := newStubbedHost(t, "vol1", "rB", &orderingRecorder{})
|
||||
h.replicationMu.Lock()
|
||||
h.setReplicationLocked(requiringReplication{rep})
|
||||
h.replicationMu.Unlock()
|
||||
fact := selfFact(3)
|
||||
fact.ReplicaStoresAwaited, fact.ReplicaStoresInitial = 2, 3
|
||||
h.noteReplicaStores(fact)
|
||||
if got := h.probeAnswer(1).GetAwaitingReplicaStoresEpoch(); got != 3 {
|
||||
t.Fatalf("awaiting epoch %d inside the wait; want 3 (the line's epoch)", got)
|
||||
}
|
||||
h.noteReplicaStores(selfFact(4)) // a new line, which never waited
|
||||
if got := h.probeAnswer(2).GetAwaitingReplicaStoresEpoch(); got != 0 {
|
||||
t.Fatalf("awaiting epoch %d on a line that never waited; want 0", got)
|
||||
}
|
||||
}
|
||||
|
||||
// The probe answer reads the wait before readiness: a stores-complete
|
||||
// assignment that lands between the two reads still leaves the not-ready
|
||||
// answer naming the wait it was given in (the frontend gate read the same
|
||||
// wait), never "not ready, not awaiting".
|
||||
func TestProbeAnswerReadsTheWaitBeforeReadiness(t *testing.T) {
|
||||
h, _, rep := newStubbedHost(t, "vol1", "rB", &orderingRecorder{})
|
||||
h.replicationMu.Lock()
|
||||
h.setReplicationLocked(requiringReplication{rep})
|
||||
h.replicationMu.Unlock()
|
||||
fact := selfFact(3)
|
||||
fact.ReplicaStoresAwaited, fact.ReplicaStoresInitial = 1, 3
|
||||
h.noteReplicaStores(fact)
|
||||
h.SetProbeRoleSource(func() (bool, bool) {
|
||||
h.noteReplicaStores(selfFact(3)) // the stores-complete assignment lands mid-probe
|
||||
return false, false // readiness was read while the wait still held
|
||||
})
|
||||
if got := h.probeAnswer(1).GetAwaitingReplicaStoresEpoch(); got != 3 {
|
||||
t.Fatalf("not-ready answer with the wait released mid-probe: awaiting epoch %d; want 3", got)
|
||||
}
|
||||
}
|
||||
|
||||
// No sample is needed to end the excuse: once the assignment carries every
|
||||
// store, a not-ready answer (a real failure, whether or not any probe or
|
||||
// heartbeat saw the frontend open in between) names no wait.
|
||||
func TestProbeAnswerAfterTheWaitNamesNothing(t *testing.T) {
|
||||
h, _, rep := newStubbedHost(t, "vol1", "rB", &orderingRecorder{})
|
||||
h.replicationMu.Lock()
|
||||
h.setReplicationLocked(requiringReplication{rep})
|
||||
h.replicationMu.Unlock()
|
||||
fact := selfFact(3)
|
||||
fact.ReplicaStoresAwaited, fact.ReplicaStoresInitial = 1, 3
|
||||
h.noteReplicaStores(fact)
|
||||
h.noteReplicaStores(selfFact(3)) // stores complete; no probe or heartbeat in between
|
||||
h.SetProbeRoleSource(func() (bool, bool) { return false, false }) // then a real failure
|
||||
if got := h.probeAnswer(1).GetAwaitingReplicaStoresEpoch(); got != 0 {
|
||||
t.Fatalf("not ready after the wait ended: awaiting epoch %d; want 0 (a real not-ready)", got)
|
||||
}
|
||||
}
|
||||
|
||||
// orderedReplication records whether the frontend gate was still closed
|
||||
// when the peers' expected stores were installed.
|
||||
type orderedReplication struct {
|
||||
*stubReplication
|
||||
h *Host
|
||||
gateWasShut bool
|
||||
installCalls int
|
||||
}
|
||||
|
||||
func (r *orderedReplication) RequireAttestedStores() {}
|
||||
func (r *orderedReplication) UpdateReplicaSet(gen uint64, targets []replication.ReplicaTarget) error {
|
||||
r.installCalls++
|
||||
r.gateWasShut = r.h.ReplicaStoresAwaited() != ""
|
||||
return r.stubReplication.UpdateReplicaSet(gen, targets)
|
||||
}
|
||||
|
||||
// A stores-complete assignment opens the frontend only after the peers'
|
||||
// expected stores are installed: no write is served before its peers can
|
||||
// count.
|
||||
func TestStoresCompleteAssignmentOpensAfterThePeersAreInstalled(t *testing.T) {
|
||||
h, _, rep := newStubbedHost(t, "vol1", "rB", &orderingRecorder{})
|
||||
r := &orderedReplication{stubReplication: rep, h: h}
|
||||
h.replicationMu.Lock()
|
||||
h.setReplicationLocked(r)
|
||||
h.replicationMu.Unlock()
|
||||
if err := h.SetSelfFence(&switchFencer{}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
waiting := selfFact(2)
|
||||
waiting.ReplicaStoresAwaited, waiting.ReplicaStoresInitial = 1, 3
|
||||
h.applyFixtureFact(waiting)
|
||||
h.applyFixtureFact(selfFact(2)) // stores complete
|
||||
if r.installCalls < 2 || !r.gateWasShut {
|
||||
t.Fatalf("install calls %d, gate shut at the stores-complete install %t; want the gate still shut", r.installCalls, r.gateWasShut)
|
||||
}
|
||||
if reason := h.ReplicaStoresAwaited(); reason != "" {
|
||||
t.Fatalf("after the install: %q; want the frontend gate open", reason)
|
||||
}
|
||||
}
|
||||
@@ -2,14 +2,43 @@ package volume
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
control "github.com/seaweedfs/seaweed-block/core/rpc/control"
|
||||
)
|
||||
|
||||
// storeWait is the primary fact's replica-store wait, read and written as
|
||||
// one value: the fact's epoch and its counts.
|
||||
type storeWait struct {
|
||||
mu sync.Mutex
|
||||
epoch uint64
|
||||
awaited, initial uint32
|
||||
}
|
||||
|
||||
// noteReplicaStores keeps the primary fact's count of a new volume's initial
|
||||
// replicas whose store the master has not recorded yet.
|
||||
func (h *Host) noteReplicaStores(f *control.AssignmentFact) {
|
||||
h.storesAwaited.Store(uint64(f.GetReplicaStoresAwaited())<<32 | uint64(f.GetReplicaStoresInitial()))
|
||||
w := &h.storeWait
|
||||
w.mu.Lock()
|
||||
w.epoch, w.awaited, w.initial = f.GetEpoch(), f.GetReplicaStoresAwaited(), f.GetReplicaStoresInitial()
|
||||
w.mu.Unlock()
|
||||
}
|
||||
|
||||
// awaitingStoresEpoch is the epoch of the primary assignment whose creation
|
||||
// wait holds now (0: none). The frontend gate reads the same value, so once
|
||||
// it reads 0 the wait no longer holds the frontend back: a not-ready answer
|
||||
// read after it has another cause.
|
||||
func (h *Host) awaitingStoresEpoch() uint64 {
|
||||
if _, ok := h.getReplication().(storeRequirer); !ok {
|
||||
return 0
|
||||
}
|
||||
w := &h.storeWait
|
||||
w.mu.Lock()
|
||||
defer w.mu.Unlock()
|
||||
if w.awaited == 0 {
|
||||
return 0
|
||||
}
|
||||
return w.epoch
|
||||
}
|
||||
|
||||
// ReplicaStoresAwaited is the reason a new volume's primary serves nothing
|
||||
@@ -20,8 +49,10 @@ func (h *Host) ReplicaStoresAwaited() string {
|
||||
if _, ok := h.getReplication().(storeRequirer); !ok {
|
||||
return ""
|
||||
}
|
||||
v := h.storesAwaited.Load()
|
||||
waiting, initial := v>>32, v&0xffffffff
|
||||
w := &h.storeWait
|
||||
w.mu.Lock()
|
||||
waiting, initial := w.awaited, w.initial
|
||||
w.mu.Unlock()
|
||||
if waiting == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -3493,6 +3493,11 @@ type ProbeAnswer struct {
|
||||
// The replica's durable epoch floor when it answered (after a fencing
|
||||
// round's raise). Above the round's fence_epoch: superseded, not counted.
|
||||
Floor uint64 `protobuf:"varint,13,opt,name=floor,proto3" json:"floor,omitempty"`
|
||||
// The epoch of this replica's primary assignment that still awaits
|
||||
// replica stores (a new volume's creation wait), when that is why it does
|
||||
// not serve: primary_ready is false by design, not because it failed.
|
||||
// 0: not awaiting. It names its line, so it never excuses another.
|
||||
AwaitingReplicaStoresEpoch uint64 `protobuf:"varint,14,opt,name=awaiting_replica_stores_epoch,json=awaitingReplicaStoresEpoch,proto3" json:"awaiting_replica_stores_epoch,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ProbeAnswer) Reset() {
|
||||
@@ -3618,6 +3623,13 @@ func (x *ProbeAnswer) GetFloor() uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ProbeAnswer) GetAwaitingReplicaStoresEpoch() uint64 {
|
||||
if x != nil {
|
||||
return x.AwaitingReplicaStoresEpoch
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ProbeAck struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -4270,7 +4282,7 @@ var file_control_proto_rawDesc = []byte{
|
||||
0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65,
|
||||
0x64, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c,
|
||||
0x52, 0x0f, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x49,
|
||||
0x64, 0x22, 0xba, 0x03, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x6e, 0x73, 0x77, 0x65,
|
||||
0x64, 0x22, 0xfd, 0x03, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x6e, 0x73, 0x77, 0x65,
|
||||
0x72, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b,
|
||||
0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
@@ -4297,170 +4309,174 @@ var file_control_proto_rawDesc = []byte{
|
||||
0x61, 0x64, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72,
|
||||
0x65, 0x61, 0x64, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x70, 0x72, 0x69, 0x6d,
|
||||
0x61, 0x72, 0x79, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x6f,
|
||||
0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x22, 0x0a,
|
||||
0x0a, 0x08, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x6b, 0x2a, 0x7c, 0x0a, 0x0b, 0x50, 0x72,
|
||||
0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x49,
|
||||
0x4d, 0x41, 0x52, 0x59, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
|
||||
0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x49, 0x4d, 0x41,
|
||||
0x52, 0x59, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41,
|
||||
0x50, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, 0x5f, 0x4b,
|
||||
0x49, 0x4e, 0x44, 0x5f, 0x50, 0x52, 0x4f, 0x4d, 0x4f, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12,
|
||||
0x17, 0x0a, 0x13, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f,
|
||||
0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, 0x10, 0x03, 0x32, 0xb7, 0x02, 0x0a, 0x12, 0x4f, 0x62, 0x73,
|
||||
0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
|
||||
0x62, 0x0a, 0x0f, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65,
|
||||
0x61, 0x74, 0x12, 0x28, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61,
|
||||
0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x25, 0x2e, 0x73,
|
||||
0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74,
|
||||
0x41, 0x63, 0x6b, 0x12, 0x56, 0x0a, 0x0b, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x50, 0x72, 0x6f,
|
||||
0x62, 0x65, 0x12, 0x24, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x50, 0x72, 0x6f,
|
||||
0x62, 0x65, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x1a, 0x21, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65,
|
||||
0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x6b, 0x12, 0x65, 0x0a, 0x12, 0x52,
|
||||
0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e,
|
||||
0x74, 0x12, 0x25, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6c, 0x75, 0x73,
|
||||
0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65,
|
||||
0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41,
|
||||
0x63, 0x6b, 0x32, 0xf1, 0x01, 0x0a, 0x11, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x73,
|
||||
0x63, 0x72, 0x69, 0x62, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73,
|
||||
0x12, 0x29, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63,
|
||||
0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x65,
|
||||
0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x41,
|
||||
0x0a, 0x1d, 0x61, 0x77, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69,
|
||||
0x63, 0x61, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18,
|
||||
0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1a, 0x61, 0x77, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x52,
|
||||
0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x45, 0x70, 0x6f, 0x63,
|
||||
0x68, 0x22, 0x0a, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x6b, 0x2a, 0x7c, 0x0a,
|
||||
0x0b, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x18,
|
||||
0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53,
|
||||
0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52,
|
||||
0x49, 0x4d, 0x41, 0x52, 0x59, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53,
|
||||
0x54, 0x52, 0x41, 0x50, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52,
|
||||
0x59, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x52, 0x4f, 0x4d, 0x4f, 0x54, 0x49, 0x4f, 0x4e,
|
||||
0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, 0x5f, 0x4b, 0x49,
|
||||
0x4e, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, 0x10, 0x03, 0x32, 0xb7, 0x02, 0x0a, 0x12,
|
||||
0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x12, 0x62, 0x0a, 0x0f, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x72,
|
||||
0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x28, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66,
|
||||
0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e,
|
||||
0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a,
|
||||
0x25, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62,
|
||||
0x65, 0x61, 0x74, 0x41, 0x63, 0x6b, 0x12, 0x56, 0x0a, 0x0b, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72,
|
||||
0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x24, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66,
|
||||
0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e,
|
||||
0x50, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x1a, 0x21, 0x2e, 0x73, 0x65,
|
||||
0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x46, 0x61, 0x63, 0x74, 0x30, 0x01, 0x12, 0x6e, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72,
|
||||
0x69, 0x62, 0x65, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x2f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x6b, 0x12, 0x65,
|
||||
0x0a, 0x12, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45,
|
||||
0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73,
|
||||
0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43,
|
||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x65,
|
||||
0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65,
|
||||
0x6e, 0x74, 0x41, 0x63, 0x6b, 0x32, 0xf1, 0x01, 0x0a, 0x11, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x14, 0x53,
|
||||
0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e,
|
||||
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x75,
|
||||
0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27,
|
||||
0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x6f,
|
||||
0x75, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a,
|
||||
0x23, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52,
|
||||
0x6f, 0x75, 0x6e, 0x64, 0x30, 0x01, 0x32, 0x77, 0x0a, 0x0f, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e,
|
||||
0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x11, 0x51, 0x75, 0x65,
|
||||
0x72, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26,
|
||||
0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64,
|
||||
0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32,
|
||||
0xd1, 0x04, 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x69, 0x64, 0x65,
|
||||
0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a, 0x10, 0x47, 0x65,
|
||||
0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x30,
|
||||
0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73,
|
||||
0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x2e, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
||||
0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x68, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x12,
|
||||
0x2b, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63,
|
||||
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x46, 0x61, 0x63, 0x74, 0x30, 0x01, 0x12, 0x6e, 0x0a, 0x14, 0x53, 0x75, 0x62,
|
||||
0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x6f, 0x75, 0x6e, 0x64,
|
||||
0x73, 0x12, 0x2f, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x50, 0x72, 0x6f, 0x62,
|
||||
0x65, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x1a, 0x23, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x50, 0x72, 0x6f,
|
||||
0x62, 0x65, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x30, 0x01, 0x32, 0x77, 0x0a, 0x0f, 0x45, 0x76, 0x69,
|
||||
0x64, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x11,
|
||||
0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x26, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x65, 0x61, 0x77,
|
||||
0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x32, 0xd1, 0x04, 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76,
|
||||
0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a,
|
||||
0x10, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x30, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x43,
|
||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e,
|
||||
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6c,
|
||||
0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d,
|
||||
0x65, 0x73, 0x12, 0x2b, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x2c, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73,
|
||||
0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d,
|
||||
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0f, 0x47, 0x65,
|
||||
0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2f, 0x2e,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a,
|
||||
0x0f, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x12, 0x2f, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x27, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x56, 0x6f, 0x6c, 0x75,
|
||||
0x6d, 0x65, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x11, 0x47, 0x65,
|
||||
0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12,
|
||||
0x31, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c,
|
||||
0x75, 0x6d, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x56, 0x6f, 0x6c,
|
||||
0x75, 0x6d, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x12, 0x57, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x75, 0x73,
|
||||
0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x2e, 0x73, 0x65, 0x61, 0x77,
|
||||
0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
||||
0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e,
|
||||
0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d,
|
||||
0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27,
|
||||
0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x45,
|
||||
0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x6f,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x31, 0x2e, 0x73,
|
||||
0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x2f, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x71, 0x0a, 0x12, 0x57, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
||||
0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64,
|
||||
0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65,
|
||||
0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x65, 0x61,
|
||||
0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e,
|
||||
0x74, 0x30, 0x01, 0x32, 0xe3, 0x07, 0x0a, 0x10, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c,
|
||||
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45,
|
||||
0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x32, 0xe3, 0x07, 0x0a, 0x10, 0x4c, 0x69, 0x66, 0x65, 0x63,
|
||||
0x79, 0x63, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0c, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x2c, 0x2e, 0x73, 0x65,
|
||||
0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75,
|
||||
0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x65, 0x61, 0x77,
|
||||
0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x56,
|
||||
0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x32, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66,
|
||||
0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x56, 0x6f, 0x6c, 0x75,
|
||||
0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x65, 0x61, 0x77,
|
||||
0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x2c, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65,
|
||||
0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52,
|
||||
0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64,
|
||||
0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75,
|
||||
0x6d, 0x65, 0x12, 0x32, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64,
|
||||
0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56,
|
||||
0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x2c, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66,
|
||||
0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e,
|
||||
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x7d, 0x0a, 0x12, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65,
|
||||
0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x73,
|
||||
0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d,
|
||||
0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x7e, 0x0a, 0x13, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65,
|
||||
0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x73,
|
||||
0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d,
|
||||
0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x7f, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d,
|
||||
0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x73, 0x65, 0x61, 0x77,
|
||||
0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e,
|
||||
0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75,
|
||||
0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x56, 0x6f,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x2e, 0x73,
|
||||
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x12, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f, 0x6c,
|
||||
0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x73, 0x65,
|
||||
0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x33, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7e, 0x0a, 0x13, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x56, 0x6f, 0x6c,
|
||||
0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x73, 0x65,
|
||||
0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x33, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x56, 0x6f,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x73,
|
||||
0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d,
|
||||
0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x33, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56,
|
||||
0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x56,
|
||||
0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4e, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65,
|
||||
0x12, 0x32, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56,
|
||||
0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73,
|
||||
0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d,
|
||||
0x61, 0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x79, 0x0a, 0x0f, 0x46, 0x61, 0x69,
|
||||
0x6c, 0x62, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x0f,
|
||||
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12,
|
||||
0x28, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x62, 0x61,
|
||||
0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x65, 0x61, 0x77,
|
||||
0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2f, 0x73, 0x65, 0x61,
|
||||
0x77, 0x65, 0x65, 0x64, 0x2d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f,
|
||||
0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x3b, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76,
|
||||
0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x32, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e,
|
||||
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61,
|
||||
0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x43, 0x68, 0x65,
|
||||
0x63, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4e, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x4c, 0x65,
|
||||
0x61, 0x73, 0x65, 0x12, 0x32, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e,
|
||||
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4d, 0x61,
|
||||
0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65,
|
||||
0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x79, 0x0a, 0x0f,
|
||||
0x46, 0x61, 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
|
||||
0x66, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x62, 0x61,
|
||||
0x63, 0x6b, 0x12, 0x28, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69,
|
||||
0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73,
|
||||
0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75,
|
||||
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2f,
|
||||
0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x2d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x63, 0x6f,
|
||||
0x72, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x3b, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -616,6 +616,11 @@ message ProbeAnswer {
|
||||
// The replica's durable epoch floor when it answered (after a fencing
|
||||
// round's raise). Above the round's fence_epoch: superseded, not counted.
|
||||
uint64 floor = 13;
|
||||
// The epoch of this replica's primary assignment that still awaits
|
||||
// replica stores (a new volume's creation wait), when that is why it does
|
||||
// not serve: primary_ready is false by design, not because it failed.
|
||||
// 0: not awaiting. It names its line, so it never excuses another.
|
||||
uint64 awaiting_replica_stores_epoch = 14;
|
||||
}
|
||||
|
||||
message ProbeAck {}
|
||||
@@ -210,7 +210,7 @@ This alpha MVP does not yet claim:
|
||||
- production-ready durability
|
||||
- multi-node Kubernetes operation
|
||||
- failover while a pod remains mounted
|
||||
- automatic failover when the primary node or pod is lost: blockmaster does not reassign on a primary it cannot read; failover is a manual admin action (a `SwBlockReplicaFailback` with the expected current line, applied for the failback executor, which calls blockmaster's admin `ExecuteFailback`)
|
||||
- automatic failover when the primary node or pod is lost: blockmaster does not reassign on a primary it cannot read; failover is a manual admin action (a `SwBlockReplicaFailback` with the expected current line, applied for the failback executor, which calls blockmaster's admin `ExecuteFailback`); when the primary is unreachable that failover runs the fencing round first and moves only to a ready replica holding the highest fenced end (a `best_effort` volume, and a reachable RF3 `sync_quorum` primary, are refused; the round stops the old primary's writes, not its reads, so confirm the old node is off or cut from its clients first)
|
||||
- real operator reconciliation
|
||||
- backend data shredding on delete
|
||||
- snapshots, clone, resize, block mode, topology spread, or NVMe-oF
|
||||
|
||||
@@ -230,6 +230,7 @@ RF2 qualification limitation until ordered-live certification is wired (#297). S
|
||||
| any | role admission failed | the listener cannot be fenced or its floor cannot be persisted; the role is not adopted and the projection is not healthy | `core/host/volume/host.go` `latchRoleAdmission` | `INV-FENCE-FLOOR-DURABLE-001` |
|
||||
| (every inbound frame) | — | a mutating frame is refused on a primary, below the floor, or before a role is known; the rebuild port applies the same rules; a failed apply closes the connection | `core/transport/replica.go` `acceptMutationLineage`, `admitMutation`, `EnterDualLane`, `handleConn` | `INV-FENCE-SELF-ON-PROMOTE-001`, `INV-FENCE-FLOOR-DURABLE-001`, `INV-REPL-REBUILD-PORT-FENCE-001`, `INV-REPL-APPLY-FAIL-001` |
|
||||
| Supporting | promotion candidate | no active recovery session; member, reachable, caught up, fenced at the current epoch, post-rebuild durable acknowledgement delivered; for RF=2 and up also a fresh probe and coverage of the required frontier: known, or proven by at least N_peers-K+1 fresh ready peers when it is unknown | `core/engine/promotion_ready.go` `BuildPromotionReadyFact`; `core/host/master/product_loop.go` `applyPromotionEvidenceGate` | `INV-REPL-PROMOTION-READY-001`, `INV-PROMOTE-FRONTIER-001`, `INV-PROMOTE-FRONTIER-PROBE-001`, `INV-PROMOTE-FRONTIER-UNKNOWN-001` |
|
||||
| Primary (unreachable) | another replica Primary at e+1 | the operator's failover (`ExecuteFailback`) of a line whose primary has no fresh, reachable heartbeat slot: the fence is pending from the attempt; the fencing round fences every other replica at e+1; only `fencedDecision`'s allowed target is published, basis Fenced at e+1, through the line's conditional update (a concurrent promotion-loop decision at the same epoch is refused); a refused or unpublished round is healed by either gate (the line's own primary continued at e+1); `best_effort` is refused, and a reachable RF3 `sync_quorum` primary's move stays refused (needs a seal) | `core/host/master/planned_move.go` `plannedMoveEvidence`, `primaryUnreachable`, `fencedMoveEvidence`; `core/host/master/product_loop.go` `applyPromotionEvidenceGate`, `applyUnsupportedPromotionEvidenceGate` | `INV-PROMOTE-UNKNOWN-CURRENT-001` |
|
||||
|
||||
**Recovery observation and apply ordering.** A probe publishes its fresh boundaries before reachability, and each emitted recovery is prepared under the adapter mutex before the next event. Same-identity delayed probes retain completed durable R; missing probe boundaries remain unknown until a valid observation arrives. Every lane and session shares one replica-wide per-LBA applied-LSN map under the apply mutex; session close releases coverage only. Recovery skips stale data while advancing its own coverage; stale live data fails without advancing recovery coverage.
|
||||
|
||||
@@ -952,8 +953,9 @@ Notes:
|
||||
| `INV-AUTH-ONE-PRIMARY-001` | A volume's authority line names one replica at its highest epoch, a reassignment supersedes the previous primary, and observed dual primaries make the volume `invalid`. A genesis `Bind` is refused once any slot of the volume holds a line. | M2 Unbound → Bound, Bound → Reassigned; K8s readiness | `core/authority/authority.go` `applyWithWorkspaceMove` (`IntentBind`, `boundReplicaForVolume`); `core/authority/policy.go` `VolumeAuthorityLine`; `core/authority/controller.go` `decideVolume`; `core/ops/managed_volume_model.go` `classifyManagedVolume` | `TestG8_0_Publisher_ReassignAdvancesPerVolumeEpochAcrossReplicaSlots` (`core/authority/g8_0_authority_failover_test.go`); `TestPublisher_RunRejectsSecondSlotGenesisBind` (`core/authority/bind_volume_regression_test.go`); `TestPublisher_BindSecondSlotOfBoundVolumeRejected`, `TestPublisher_BindOtherVolumeUnaffected`, `TestPublisher_ReassignToOtherSlotStillAllowedThenBindRejected`, `TestPublisher_BindAfterRestartRejectedForAnySlot` (`core/authority/bind_volume_genesis_test.go`); `TestManagedVolumeProjection_InvalidDualPrimaryBeatsReady` (`core/ops/managed_volume_model_test.go`) | — | ACTIVE |
|
||||
| `INV-FENCE-STALE-PRIMARY-001` | Once a primary has observed a newer line for another replica, its backend refuses `Read`, `Write` and `Sync`, and replicas refuse its frames below their epoch floor. | M3 Primary → Supporting \| Excluded | `core/host/volume/projection_bridge.go` `projectionWithSupersede`; `core/frontend/durable/storage_adapter.go` `lineageCheck`; `core/transport/replica.go` `admitMutation` | `TestG8A_SupersedeFact_FencesOldPrimaryDurableBackend` (`core/host/volume/g8a_stale_fence_test.go`); `TestG2_PromotedHostRefusesShipFromDeposedPrimary` (`core/host/volume/g2_self_fence_test.go`) | `ReplicationFailover` `NoStaleAck` | ACTIVE |
|
||||
| `INV-PROMOTE-FRONTIER-001` | With a known required acknowledgement frontier under `sync_quorum` or `sync_all`, the RF=3 promotion gate allows only probed-ready candidates whose durable LSN is at least the required LSN. | M3 Supporting → promotion candidate (RF=3 gate) | `core/host/master/product_loop.go` `promotionAllowedReplicas`, `applyPromotionEvidenceGate`; `core/host/master/probe_round.go` (`SyncAckKnown`); `core/engine/promotion_ready.go` `BuildPromotionReadyFact` | `TestMountedFailover_ProductLoopRF3PromotesCandidateCoveringSyncAckProbe` (`core/host/master/product_loop_test.go`); `TestPromotionAllowedReplicas_RequiredFrontierCoverage`, `TestWorkloadPlanProvider_RequiredFrontierKnownness` (`core/host/master/promotion_frontier_coverage_test.go`) | — | ACTIVE |
|
||||
| `INV-PROMOTE-CREATION-WAIT-001` | A primary that answers the promotion probe not ready is excused from replacement only by its own answer that its assignment at the current line's epoch awaits replica stores (read before its readiness), and only while its own fresh slot is acceptable; the master keeps no state for it. | GUARD (the promotion models have no bring-up) | `core/host/master/product_loop.go` `probePromotionCandidatesCurrent`; `core/host/master/probe_round.go`; `core/host/volume/probe_round.go` `probeAnswer`; `core/host/volume/workspace_startup.go` `awaitingStoresEpoch` | `TestPrimaryAwaitingReplicaStoresIsNotReplacedForNotReady`, `TestMasterRestartInTheGapDoesNotReassign`, `TestPrimaryNotReadyForAnotherReasonIsReplaced`, `TestAwaitingAnswerForAnotherLineExcusesNothing` (`core/host/master/creating_primary_gate_test.go`); `TestProbeRound_CarriesThePrimarysAwaitingStoresEpoch` (`core/host/master/probe_round_test.go`); `TestProbeAnswerReadsTheWaitBeforeReadiness`, `TestProbeAnswerAfterTheWaitNamesNothing` (`core/host/volume/replica_stores_wait_test.go`) | — | ACTIVE |
|
||||
| `INV-PROMOTE-FRONTIER-PROBE-001` | For a replicated volume (two or more slots), the gate allows no candidate unless this tick's promotion probe succeeded with a known ack profile. | M3 Supporting → promotion candidate (the gate, RF=2 and up) | `core/host/master/product_loop.go` `applyPromotionEvidenceGate`, `promotionAllowedReplicas` | `TestMountedFailover_ProductLoopRF3BlocksFailoverWithoutFreshPromotionProbe` (`core/host/master/product_loop_test.go`); `TestMountedFailover_ProductLoopRF2DecidesOnThePromotionGate` (`core/host/master/promotion_frontier_coverage_test.go`) | — | ACTIVE |
|
||||
| `INV-PROMOTE-UNKNOWN-CURRENT-001` | A current primary whose status cannot be read (probe refused, timed out, pod gone) is unknown, never failed: no promotion path reassigns on it; a direct reassign needs the primary's own not-ready report. | M3 Primary → promotion candidate (both promotion paths) | `core/host/master/product_loop.go` `applyPromotionEvidenceGate` (supported path), `applyUnsupportedPromotionEvidenceGate` (unsupported path) | `TestUnsupportedPathNeverReassignsOnAnUnansweredPrimary` (`core/host/master/primary_boot_grace_gate_test.go`); `TestMountedFailover_ProductLoopRF3DoesNotReassignWhenCurrentSlotMissing` (`core/host/master/product_loop_test.go`). Limits: Kubernetes alpha failover on node or pod loss is a manual admin action in this release | — | ACTIVE |
|
||||
| `INV-PROMOTE-UNKNOWN-CURRENT-001` | A current primary whose status cannot be read (probe refused, timed out, pod gone) is unknown, never failed: no promotion path reassigns on it; a direct reassign needs the primary's own not-ready report. | M3 Primary → promotion candidate (both promotion paths) | `core/host/master/product_loop.go` `applyPromotionEvidenceGate` (supported path), `applyUnsupportedPromotionEvidenceGate` (unsupported path) | `TestUnsupportedPathNeverReassignsOnAnUnansweredPrimary` (`core/host/master/primary_boot_grace_gate_test.go`); `TestMountedFailover_ProductLoopRF3DoesNotReassignWhenCurrentSlotMissing` (`core/host/master/product_loop_test.go`). Limits: Kubernetes alpha failover on node or pod loss is a manual admin action in this release; the admin's failover runs the fencing round and publishes only on its decision (basis Fenced) when the primary is unreachable (no fresh, reachable heartbeat; any replica count); a reachable RF3 `sync_quorum` primary's move stays refused (it needs a seal) and `best_effort` stays refused (`core/host/master/planned_move.go` `fencedMoveEvidence`; `TestManualFailoverRF3SyncQuorumDecidesOnTheFencingRound`, `TestManualFailoverRF2UnreachablePrimaryDecidesOnTheFencingRound`, `TestManualFailoverRF2BestEffortIsNeverFenced`, `TestManualFailoverRF3ReachablePrimaryIsRefused`, `TestManualFailoverAndThePromotionLoopPublishOneLine`) | — | ACTIVE |
|
||||
| `INV-PROMOTE-FRONTIER-UNKNOWN-001` | With an unknown frontier under `sync_quorum` or `sync_all`, the gate allows the highest-durable ready candidate only if at least N_peers-K+1 of the N_peers peers are probed ready this tick and have a fresh heartbeat (K as in `waitForSyncAcks`); else none. | M3 Supporting → promotion candidate (RF=3 gate) | `core/host/master/product_loop.go` `promotionAllowedReplicas`, `unknownFrontierSurvivorsNeeded`, `freshPromotionPeers`; `core/replication/async_ack.go` `waitForSyncAcks` | `TestMountedFailover_ProductLoopRF3UnknownRequiredLSNFallsBackToHighestDurableLSN` (`core/host/master/product_loop_test.go`); `TestProductLoop_MissingRequiredFrontierRefusesRF3Promotion` (`core/host/master/promotion_missing_frontier_regression_test.go`); `TestUnknownFrontierSurvivorsNeeded`, `TestFreshPromotionPeers_UsesObservationFreshness`, `TestProductLoop_UnknownFrontierSurvivorReadyLastTickMissingNowRefused` (`core/host/master/promotion_frontier_coverage_test.go`) | — | ACTIVE |
|
||||
| `INV-PROMOTE-FRONTIER-BEST-EFFORT-001` | Under `best_effort`, the gate allows no candidate when a nonzero required frontier is given, and otherwise allows the highest-durable ready candidate. | M3 Supporting → promotion candidate (RF=3 gate) | `core/host/master/product_loop.go` `promotionAllowedReplicas` | `TestMountedFailover_ProductLoopRF3BestEffortUnknownRequiredLSNCanSelectHighestDurableLSN`, `TestMountedFailover_ProductLoopRF3RejectsBestEffortProbeForHA` (`core/host/master/product_loop_test.go`); `TestPromotionAllowedReplicas_RequiredFrontierCoverage` (`core/host/master/promotion_frontier_coverage_test.go`) | — | ACTIVE |
|
||||
| `INV-CSI-CONSUMES-AUTHORITY-001` | CSI never imports authority code or builds assignment facts; it takes the publish target from blockmaster and refreshes it before a stage, and blockmaster mints the IDs of the events CSI reports. | M2 (read side) | `core/csi/master_backend.go` `LookupPublishTarget`; `core/csi/node.go` `refreshPublishContext`; `core/host/master/observation_service.go` `ReportClusterEvent` | `TestG15a_CSI_DoesNotImportAuthorityOrConstructAssignmentFacts` (`core/csi/boundary_guard_test.go`); `TestG15e_CSIReattachUsesFreshPublishTargetAfterUnstage` (`core/csi/node_test.go`); `TestObservationService_ReportClusterEventAppearsInVolumeTimeline` (`core/host/master/observation_service_test.go`) | — | ACTIVE |
|
||||
|
||||
@@ -210,7 +210,7 @@ The volume computes whether it may become primary; blockmaster decides; only the
|
||||
|
||||
**RF=3 gate** (`core/host/master/promotion_probe.go`, `promotionAllowedReplicas`, `chooseAllowedPromotionTarget`): no promotion when the probe failed or is not installed, or the ack profile is unknown; a candidate is skipped when it is not `replica_ready` with a known frontier, or its durable LSN is below the required frontier. The decision is recorded as an ops event (`candidate_covers_required_frontier`, `candidate_frontier_behind`, `no_promotion_ready_candidate`). The required frontier per volume (`RequiredLSNByVolume`) is not set by `cmd/blockmaster` today, so the frontier is unknown and coverage is proven from the survivors instead: with `sync_quorum` or `sync_all`, the ready candidate with the highest durable LSN is promoted only when at least P-K+1 of the P peers are probed ready (known durable LSN) and have a fresh heartbeat, where K is the number of peer acks a write needs (`waitForSyncAcks`: P for `sync_all`, (P+1)/2 for `sync_quorum`). Any P-K+1 peers include one that holds every acknowledged write that their sampled frontiers represent. The probes of one tick are snapshots, not a fence: a primary that is still running can acknowledge after a sample was taken (for example, r3 reports 70 in a held probe response, the old primary then acknowledges 71, and r2 at 70 is still selected). That is the missing primary lease below (§12, #195). For RF=3 that is both peers under `sync_quorum` and one under `sync_all`; with fewer, nothing is promoted. An unknown frontier is never read as zero. `best_effort` is unchanged (§12).
|
||||
|
||||
**A current primary that does not answer is unknown, not failed.** When its status cannot be read (a pod gone, a partition), blockmaster does not reassign on either path, however ready the survivors: on a partition the primary may still be serving. Only the primary's own not-ready report moves the line automatically; otherwise failover is a manual admin action in this release.
|
||||
**A current primary that does not answer is unknown, not failed.** When its status cannot be read (a pod gone, a partition), blockmaster does not reassign on either path, however ready the survivors: on a partition the primary may still be serving. Only the primary's own not-ready report moves the line automatically; otherwise failover is a manual admin action in this release. The admin's failover of an unreachable primary (no fresh, reachable heartbeat) is decided on the fencing round, at any replica count: every other replica is fenced at N+1, the target must hold the highest fenced end and be ready, and the line carries basis Fenced; a round that publishes nothing leaves the fence pending, and the line's own primary is continued at N+1 when it answers ready again. The round stops the old primary's writes, not its reads: confirm the old node is off or cut from its clients first.
|
||||
|
||||
**What blocks a promotion:** any engine reason above; a current primary whose status cannot be read; `unhealthy_reason` set or withdrawn; an unreachable or ineligible server; boot grace still holding; a current primary whose probe is ready; a snapshot rejected for slot count; slots that changed while the probe ran.
|
||||
|
||||
@@ -222,6 +222,8 @@ stateDiagram-v2
|
||||
Suspect --> Blocked: no promotion-ready candidate
|
||||
Blocked --> Suspect: next product tick
|
||||
Suspect --> Reassigned: candidate chosen, IntentReassign
|
||||
Suspect --> Reassigned: admin failover of an unreachable primary, fencing round allows the target (basis Fenced)
|
||||
Suspect --> Serving: fencing round refused or unpublished, own primary answers ready (heal at N+1)
|
||||
Reassigned --> Serving: publisher persists epoch N+1, new primary fences and serves
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user