Repository navigation
Skip unnecessary DescribeStreamConsumer call and sleep for ACTIVE consumers - #1772
Merged
chenylee-aws merged 1 commit intoJun 10, 2026
Conversation
Boxuan996
had a problem deploying
to
manual-approval
June 9, 2026 22:54 — with
GitHub Actions
Failure
Boxuan996
force-pushed
the
fix/skip-waitForActive-for-active-consumers
branch
from
June 9, 2026 22:58
d22f8a8 to
89f2065
Compare
Boxuan996
had a problem deploying
to
manual-approval
June 9, 2026 22:58 — with
GitHub Actions
Failure
…VE consumers FanOutConsumerRegistration.getOrCreateStreamConsumerArn() calls describeStreamConsumer() to get the consumer ARN, but never checks the consumer status from that response. It then unconditionally calls waitForActive() which makes a second describeStreamConsumer() call and sleeps retryBackoffMillis (1s) even when the consumer is already ACTIVE. For multi-stream EFO applications with many streams, this adds ~1s of unnecessary delay per unique stream during the Scheduler loop, causing significant startup latency (e.g., 160 streams x 1.1s = 176s blocking). Fix: - Check consumer status from the initial describeStreamConsumer() response - If already ACTIVE, return immediately (skip waitForActive entirely) - In waitForActive loop, break immediately when ACTIVE status detected (prevents sleeping before the while condition is re-evaluated) - Log actual consumer status when waiting Impact: Reduces per-stream consumer ARN lookup from ~1.1s to ~15-20ms for existing ACTIVE consumers (the common case after first registration).
Boxuan996
force-pushed
the
fix/skip-waitForActive-for-active-consumers
branch
from
June 9, 2026 23:10
89f2065 to
51cc2de
Compare
Boxuan996
had a problem deploying
to
manual-approval
June 9, 2026 23:10 — with
GitHub Actions
Failure
chenylee-aws
approved these changes
Jun 10, 2026
vincentvilo-aws
pushed a commit
to vincentvilo-aws/amazon-kinesis-client
that referenced
this pull request
Jun 17, 2026
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FanOutConsumerRegistration.getOrCreateStreamConsumerArn() calls describeStreamConsumer() to get the consumer ARN, but never checks the consumer status from that response. It then unconditionally calls waitForActive() which makes a second describeStreamConsumer() call and sleeps retryBackoffMillis (1s) even when the consumer is already ACTIVE.
For multi-stream EFO applications with many streams, this adds ~1s of unnecessary delay per unique stream during the Scheduler loop, causing significant startup latency (e.g., 160 streams x 1.1s = 176s blocking).
Fix:
Impact: Reduces per-stream consumer ARN lookup from ~1.1s to ~15-20ms for existing ACTIVE consumers (the common case after first registration).
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.