fix: recover inconsistent multi-pool copies before acknowledging PUT

Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
Feng Ruohang
2026-10-25 15:56:28 +08:00
parent 6fdea3b8d9
commit f54c04846e
3 changed files with 62 additions and 10 deletions
@@ -136,7 +136,7 @@ func TestPoolsConditionalPutHTTP(t *testing.T) {
opts.MTime = UTCNow().Add(-time.Minute)
current := putConsistencyObject(t, z, bucket, object, currentPool, "current", opts)
defer conditionalPutPool(t, z, object, target)()
idx, err := z.getWritePoolIdx(t.Context(), bucket, object, 11, false)
idx, _, err := z.getWritePoolIdx(t.Context(), bucket, object, 11, false, true)
if err != nil || idx != target {
t.Fatalf("allocation target=%d: idx=%d err=%v", target, idx, err)
}