Repository navigation
Conversation
Signed-off-by: Minh Vu <vuhoangminh97@gmail.com>
Signed-off-by: Minh Vu <vuhoangminh97@gmail.com>
zeroshade
left a comment
There was a problem hiding this comment.
Threading ctx through Create/WriteFile/WalkDir completes what #2067 started, and the cleanup paths (manifest writer setup, manifest-list write, rewritten/filtered manifests, merge/cluster orphans) all use context.WithoutCancel, so a canceled commit still cleans up. The errgroup writers close inside their goroutines, so nothing outlives the group context. On a merge with current main, go vet ./... (including -tags integration) and the full go test ./... pass. One non-blocking nit: writeVersionHint runs after the commit has landed, so a canceled ctx there just leaves the hint stale; context.WithoutCancel(ctx) would match the cleanup paths, and the "no caller context" comment above its Remove is now outdated. LGTM.
What
Make
WriteFileIO.Create,WriteFileIO.WriteFile, andListableIO.WalkDiracceptcontext.Context.Why
Cloud writes and directory listings need caller cancellation.
Implementation