From 2e2a425ecaa1672fa75e3a13d843d87462e4d1df Mon Sep 17 00:00:00 2001 From: pingqiu Date: Wed, 25 Nov 2026 21:47:00 -0800 Subject: [PATCH] fix(master): the delete reads the creation phase with the volume's line Co-Authored-By: Claude Opus 5.5 --- seaweed-block/core/host/master/volume_delete_authority.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/seaweed-block/core/host/master/volume_delete_authority.go b/seaweed-block/core/host/master/volume_delete_authority.go index 2da9c4e363..34e0729a13 100644 --- a/seaweed-block/core/host/master/volume_delete_authority.go +++ b/seaweed-block/core/host/master/volume_delete_authority.go @@ -41,7 +41,10 @@ func (a *volumeDeleteAuthority) Reserve(ctx context.Context) error { // lease does not refuse the reservation, which stops every grant; the // HEAD update still waits for no live lease. A volume that ever completed // creation keeps the live-lease refusal. - if h.inCreationPhase(a.volume, authority.AuthorityBasis{}, nil) != "" { + // The line, so a primary that has just answered ready is recorded + // (creation complete) before the delete is decided. + line, _ := h.Publisher().VolumeAuthorityLine(a.volume) + if h.inCreationPhase(a.volume, line, nil) != "" { return h.Publisher().ReserveNeverCreatedWorkspaceDeletion(ctx, a.volume, persist) } return h.Publisher().ReserveWorkspaceDeletion(ctx, a.volume, persist)