Treat sandboxes as root gc resources and scan referenced objects

Signed-off-by: Henry Wang <henwang@amazon.com>
This commit is contained in:
Henry Wang
2023-02-27 19:28:28 +00:00
parent 2be87c1a75
commit cf46d3c6fc
2 changed files with 28 additions and 0 deletions

View File

@@ -430,6 +430,20 @@ func (c *gcContext) scanRoots(ctx context.Context, tx *bolt.Tx, nc chan<- gc.Nod
}
}
bbkt := nbkt.Bucket(bucketKeyObjectSandboxes)
if bbkt != nil {
if err := bbkt.ForEach(func(k, v []byte) error {
if v != nil {
return nil
}
sbbkt := bbkt.Bucket(k)
return c.sendLabelRefs(ns, sbbkt, fn)
}); err != nil {
return err
}
}
c.active(ns, fn)
}
return cerr