Skip to content

fix(sdks): align pool idle TTL via state store hook#708

Merged
Pangjiping merged 1 commit intoalibaba:mainfrom
ninan-nn:hotfix/fix_idle_ttl_for_in_memory_store
Apr 14, 2026
Merged

fix(sdks): align pool idle TTL via state store hook#708
Pangjiping merged 1 commit intoalibaba:mainfrom
ninan-nn:hotfix/fix_idle_ttl_for_in_memory_store

Conversation

@ninan-nn
Copy link
Copy Markdown
Collaborator

@ninan-nn ninan-nn commented Apr 13, 2026

Summary

  • Add a generic PoolStateStore.setIdleEntryTtl(poolName, idleTtl) extension hook (default no-op) so SandboxPool stays decoupled from concrete store implementations.
  • Update SandboxPool.start() to configure idle TTL through the store interface using config.idleTimeout.
  • Refactor InMemoryPoolStateStore to keep default 24h TTL internally and support per-pool TTL via the new hook (without exposing TTL in constructor).
  • Add/adjust tests to verify TTL hook behavior and validation.

Testing

  • Not run (explain why)
  • Unit tests
  • Integration tests
  • e2e / manual verification

Executed:

  • ./gradlew :sandbox:test --tests "com.alibaba.opensandbox.sandbox.infrastructure.pool.InMemoryPoolStateStoreTest" --tests "com.alibaba.opensandbox.sandbox.pool.SandboxPoolTest"

Breaking Changes

  • None
  • Yes (describe impact and migration path)

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

@ninan-nn ninan-nn changed the title fix(sdks): fix in memory store idle ttl fix(sdks): align pool idle TTL via state store hook Apr 13, 2026
Copy link
Copy Markdown
Collaborator

@Pangjiping Pangjiping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Pangjiping Pangjiping merged commit 0e83095 into alibaba:main Apr 14, 2026
24 of 25 checks passed
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.

2 participants