Skip to content

Commit 3422d40

Browse files
committed
fix: trim verbose rollback comment per review feedback
Signed-off-by: Sanchit2662 <sanchit2662@gmail.com>
1 parent 0b39ca8 commit 3422d40

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

pkg/workloadmanager/handlers.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,8 @@ func (s *Server) createSandbox(ctx context.Context, dynamicClient dynamic.Interf
149149
return nil, err
150150
}
151151

152-
// Register rollback IMMEDIATELY after the placeholder is committed, before
153-
// any error-returning step (workload create, ready wait, pod-IP lookup,
154-
// entrypoint probe, store update). Otherwise an early return from a failed
155-
// Sandbox/SandboxClaim Create would leak the placeholder in the store until
156-
// GC's idle-timeout window catches it. sandboxRollback is idempotent —
157-
// delete{Sandbox,SandboxClaim} swallow NotFound and DeleteSandboxBySessionID
158-
// is safe on a row that no longer exists, so this is safe to register before
159-
// the workload itself is created.
152+
// Register rollback right after the placeholder is stored; sandboxRollback
153+
// is safe to run before the workload exists because deletes ignore NotFound.
160154
needRollbackSandbox := true
161155
defer func() {
162156
if !needRollbackSandbox {

0 commit comments

Comments
 (0)