Skip to content

[adapters] NATS: Reduce probe API calls and default inactivity timeout to 60s#5828

Merged
blp merged 3 commits intofeldera:mainfrom
fornybar:kfollesdal/stream-info-inactivity-timeout
Mar 16, 2026
Merged

[adapters] NATS: Reduce probe API calls and default inactivity timeout to 60s#5828
blp merged 3 commits intofeldera:mainfrom
fornybar:kfollesdal/stream-info-inactivity-timeout

Conversation

@kfollesdal
Copy link
Contributor

  • Removed an extra JetStream stream-info roundtrip in the NATS input probe/retry path.
  • Changed NATS inactivity_timeout_secs default from 10 to 60, 10 was to aggressive and 60 is a better default.

Describe Manual Test Plan

Just run test. No manual test.

Checklist

  • Unit tests added/updated
  • Integration tests added/updated
  • Documentation updated
  • Changelog updated

Breaking Changes?

Mark if you think the answer is yes for any of these components:

Describe Incompatible Changes

@kfollesdal kfollesdal force-pushed the kfollesdal/stream-info-inactivity-timeout branch 2 times, most recently from f31d3b5 to 36576ca Compare March 14, 2026 23:05
Copy link

@mythical-fred mythical-fred left a comment

Choose a reason for hiding this comment

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

LGTM. is safe here — already fetches stream state, so this is a pure optimization (one fewer roundtrip). Default timeout 10→60 is sensible and documented in the changelog.

fetch_stream_state called get_stream and then stream.info, causing two STREAM.INFO requests per probe. Use get_stream's cached info to avoid duplicate JetStream API calls during health checks and retries.

Signed-off-by: kfollesdal <kristoffer.follesdal@eviny.no>
Raise the default inactivity timeout from 10 to 60 seconds to reduce
premature health-check retries on quiet streams.

Signed-off-by: kfollesdal <kristoffer.follesdal@eviny.no>
Signed-off-by: kfollesdal <kristoffer.follesdal@eviny.no>
@kfollesdal kfollesdal force-pushed the kfollesdal/stream-info-inactivity-timeout branch from 36576ca to 5f0ffd4 Compare March 16, 2026 15:45
@blp
Copy link
Member

blp commented Mar 16, 2026

Thank you!

@blp blp enabled auto-merge March 16, 2026 18:54
@blp blp added this pull request to the merge queue Mar 16, 2026
Merged via the queue into feldera:main with commit bba65fa Mar 16, 2026
1 check 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.

3 participants