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

Modify S3 Source to create multiple SqsWorkers #4239

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

kkondaka
Copy link
Collaborator

@kkondaka kkondaka commented Mar 5, 2024

Description

Modify S3 Source to create multiple SqsWorkers to process SQS messages in parallel.
Provided configuration option to change the number of workers.

Issues Resolved

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • [ X] Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
@@ -43,6 +44,10 @@ public class S3SourceConfig {
@Valid
private SqsOptions sqsOptions;

@JsonProperty("workers")
@Valid
private int numWorkers = DEFAULT_NUMBER_OF_WORKERS;
Copy link
Member

Choose a reason for hiding this comment

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

Please add an @Min(1) on this.

We should probably also have some sort of upper bound to prevent excessive values. Perhaps: @Max(1000).

@@ -24,6 +24,7 @@

public class S3SourceConfig {
static final Duration DEFAULT_BUFFER_TIMEOUT = Duration.ofSeconds(10);
static final Duration DEFAULT_NUMBER_OF_WORKERS = 5;
Copy link
Member

Choose a reason for hiding this comment

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

I think we should leave this as 1 so that this change does not impact existing pipelines. I believe with large object sizes 1 is the ideal value also.

@dlvenable dlvenable added this to the v2.7 milestone Mar 5, 2024
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Copy link
Member

@dlvenable dlvenable left a comment

Choose a reason for hiding this comment

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

Thanks for making this change!

@kkondaka kkondaka merged commit 6a30c6f into opensearch-project:main Mar 6, 2024
47 checks passed
@kkondaka kkondaka deleted the s3-perf branch May 13, 2024 05:51
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