Skip to content

Modify S3 Source to create multiple SqsWorkers#4239

Merged
kkondaka merged 2 commits into
opensearch-project:mainfrom
kkondaka:s3-perf
Mar 6, 2024
Merged

Modify S3 Source to create multiple SqsWorkers#4239
kkondaka merged 2 commits into
opensearch-project:mainfrom
kkondaka:s3-perf

Conversation

@kkondaka

@kkondaka kkondaka commented Mar 5, 2024

Copy link
Copy Markdown
Collaborator

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>

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

Copy link
Copy Markdown
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).


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

Copy link
Copy Markdown
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>

@dlvenable dlvenable left a comment

Copy link
Copy Markdown
Member

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
@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.

3 participants