Skip to content
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

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

furq-aws
Copy link
Contributor

Issue #, if available:
N/A.

Description of changes:
Update the RetrievalFactory implementations to utilize the pre-existing StreamIdentifier from the StreamConfig argument.
A StreamIdentifier provided from Scheduler (through StreamConfig) may contain additional information such as the stream's ARN, and we don't need to reconstruct it from ShardInfo 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.

@furq-aws furq-aws marked this pull request as ready for review March 28, 2024 16:49
@furq-aws furq-aws force-pushed the streamidentifier-propagation branch from 5a26958 to 568eae3 Compare March 29, 2024 16:59
* @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) {
Copy link
Contributor

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

Copy link
Contributor Author

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) {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@furq-aws furq-aws merged commit e999019 into awslabs:master Apr 15, 2024
1 check passed
@furq-aws furq-aws deleted the streamidentifier-propagation branch April 15, 2024 18:17
vincentvilo-aws pushed a commit to vincentvilo-aws/amazon-kinesis-client that referenced this pull request Apr 17, 2024
akidambisrinivasan pushed a commit to akidambisrinivasan/amazon-kinesis-client that referenced this pull request Apr 29, 2024
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.

None yet

3 participants