Skip to content

[K8s] Add TTL and size limit to Flink K8s MetricCache#4403

Closed
shangeyao wants to merge 1 commit into
apache:devfrom
shangeyao:fix/k8s-metric-cache-ttl
Closed

[K8s] Add TTL and size limit to Flink K8s MetricCache#4403
shangeyao wants to merge 1 commit into
apache:devfrom
shangeyao:fix/k8s-metric-cache-ttl

Conversation

@shangeyao

Copy link
Copy Markdown
Contributor

Summary

  • Add 6-hour expireAfterWrite TTL to MetricCache
  • Cap cache at 10,000 entries via maximumSize

Fixes #4402

Test plan

  • K8s Flink job metrics still update while running
  • Stale metrics are eventually evicted after TTL

AI Disclosure

  • Model: Claude Opus 4.6
  • Platform/Tool: Cursor
  • Human Oversight: partially reviewed
  • Prompt Summary: Add MetricCache TTL from dev branch scan

Made with Cursor

Expire K8s metric entries after six hours and cap cache size to avoid
retaining stale metrics when jobs stop without explicit invalidation.

Generated-by: Cursor
Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

Copy link
Copy Markdown

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.

[K8s] Add TTL and size limit to Flink K8s MetricCache

1 participant