test(gc): preserve the remote frontier when retiring source HEAD roots

This commit is contained in:
pingqiu committed 2026-11-15 10:43:03 -08:00
1 parent 6daca22e2f
commit 6d2ab2e8db
2 files changed
+2 -2

No files matched your search

@@ -130,7 +130,7 @@ func TestGC_PublishedUnnamedAttemptRootsUntilDeletingGrace(t *testing.T) {
c.f = f
oldPath := snapPath(t, f, "v1", "s1")
r, _ := NewChunkRemote(f, b, path.Join(catBase, "v1"))
if _, e := r.CASHead(ctx, storage.ChunkHeadVersion{Gen: h.Gen, Epoch: h.Epoch}, storage.ChunkHead{Epoch: 1, Holder: "h1"}); e != nil {
if _, e := r.CASHead(ctx, storage.ChunkHeadVersion{Gen: h.Gen, Epoch: h.Epoch}, storage.ChunkHead{Epoch: 1, Holder: "h1", RemoteLSN: h.RemoteLSN}); e != nil {
t.Fatal(e)
}
*now = now.Add(DefaultOpDeadline + time.Second)
@@ -295,7 +295,7 @@ func TestGC_SnapshotAndQualifiedForkAreRoots(t *testing.T) {
t.Fatal(e)
}
r, _ := NewChunkRemote(f, b, path.Join(catBase, "v1"))
if _, e := r.CASHead(ctx, storage.ChunkHeadVersion{Gen: h.Gen, Epoch: h.Epoch}, storage.ChunkHead{Epoch: 1, Holder: "h1", Chunks: map[uint64]storage.ChunkRef{}}); e != nil {
if _, e := r.CASHead(ctx, storage.ChunkHeadVersion{Gen: h.Gen, Epoch: h.Epoch}, storage.ChunkHead{Epoch: 1, Holder: "h1", RemoteLSN: h.RemoteLSN, Chunks: map[uint64]storage.ChunkRef{}}); e != nil {
t.Fatal(e)
}
for i := 0; i < 2; i++ {