Skip to content

[Execution] Release the child tasks dropped by a non-null violation - #138

Open
michaelstaib wants to merge 2 commits into
mst/execution-request-cleanup-failuresfrom
mst/execution-dropped-child-tasks
Open

michaelstaib wants to merge 2 commits into
mst/execution-request-cleanup-failuresfrom
mst/execution-dropped-child-tasks

Conversation

@michaelstaib

Copy link
Copy Markdown
Owner

When a non-null violation nulls a field, ResolverTask cleared its child task buffer and BatchResolverTask removed the failing entry's children. Those child tasks were already counted against the operation context, so they were never released. The deferred branch then waited for them forever, and the request context was discarded by the pool guard instead of being reused.

Both drop sites now return each dropped child task through the regular release path (ResolverTaskFactory.ReleaseUnregisteredTasks). A dropped resolver task goes back to its pool, which releases its operation context. A dropped defer task is reset, which disposes its defer context.

Tests in DeferDroppedChildTaskTests cover the resolver and batch variants. They assert the completed entry's error and that every context returns to its pool. Before the fix they time out.

The change runs only when a non-null violation drops child tasks. No benchmark was run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant