-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update RetrievalFactory implementations to utilize the StreamIdentifier field of StreamConfig #1291
Update RetrievalFactory implementations to utilize the StreamIdentifier field of StreamConfig #1291
Conversation
…er field of StreamConfig
5a26958
to
568eae3
Compare
* @param streamConfig The {@link StreamConfig} containing details for the stream. | ||
* @param metricsFactory The {@link MetricsFactory} for recording metrics. | ||
* @return A {@link RecordsPublisher} instance for retrieving records from the shard. | ||
*/ | ||
default RecordsPublisher createGetRecordsCache(ShardInfo shardInfo, StreamConfig streamConfig, MetricsFactory metricsFactory) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ShardInfo already has streamConfig, can we not make sure shardInfo has the correct streamConfig instead of passing it in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per discussion with @akidambisrinivasan and @lucienlu-aws -
Submitted a PR to embed a reference to StreamConfig
within ShardInfo
.
However, due to the increased risk of backwards-incompatibility within that approach, we have decided to proceed with this current approach for faster delivery.
final StreamConfig streamConfig, | ||
final MetricsFactory metricsFactory) { | ||
@NonNull final StreamConfig streamConfig, | ||
@Nullable final MetricsFactory metricsFactory) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not even used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, the MetricsFactory
argument doesn't seem to actually be used in the FanOutRetrievalFactory
implementation.
…er field of StreamConfig (awslabs#1291)
…er field of StreamConfig (awslabs#1291)
Issue #, if available:
N/A.
Description of changes:
Update the
RetrievalFactory
implementations to utilize the pre-existingStreamIdentifier
from theStreamConfig
argument.A
StreamIdentifier
provided fromScheduler
(throughStreamConfig
) may contain additional information such as the stream's ARN, and we don't need to reconstruct it fromShardInfo
since it is already available here.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.