Skip to content

[improvement]: add logic to detect thread pool leak#308

Merged
zhongkechen merged 5 commits intomainfrom
threadPoolCheck
Apr 2, 2026
Merged

[improvement]: add logic to detect thread pool leak#308
zhongkechen merged 5 commits intomainfrom
threadPoolCheck

Conversation

@zhongkechen
Copy link
Copy Markdown
Contributor

@zhongkechen zhongkechen commented Apr 2, 2026

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Issue Link, if available

Fixes #297

Description

  • When an invocation completes, validate that the user thread pool is empty
  • In local test runner, add nextAttemptDelaySeconds for steps in READY/PENDING status to align with the backend behavior
  • If a user thread is stuck running, SDK will always wait for it to complete before moving on to the next lambda request in order to prevent thread pool leaks. The execution will fail in this case, so it would be easier for users to detect the stuck thread issue.

Demo/Screenshots

Checklist

  • I have filled out every section of the PR template
  • I have thoroughly tested this change

Testing

Unit Tests

Have unit tests been written for these changes?

Integration Tests

Have integration tests been written for these changes?

Examples

Has a new example been added for the change? (if applicable)

@zhongkechen zhongkechen self-assigned this Apr 2, 2026
@zhongkechen zhongkechen marked this pull request as ready for review April 2, 2026 20:41
@zhongkechen zhongkechen requested a review from a team April 2, 2026 20:41
@zhongkechen zhongkechen merged commit a2a801b into main Apr 2, 2026
11 checks passed
@zhongkechen zhongkechen deleted the threadPoolCheck branch April 2, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add a validation to user thread pool

3 participants