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

[Backport to 2.17] add rate limiting for offline batch jobs, set default bulk size to 50… #3122

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

Zhangxunmt
Copy link
Collaborator

The backport PR from #3116

  • add rate limiting for offline batch jobs, set default bulk size to 500
  • update error code to 429 for rate limiting and update logs

Description

[Describe what this change achieves]

Related Issues

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

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

opensearch-project#3116)

* add rate limiting for offline batch jobs, set default bulk size to 500

Signed-off-by: Xun Zhang <[email protected]>

* update error code to 429 for rate limiting and update logs

Signed-off-by: Xun Zhang <[email protected]>

---------

Signed-off-by: Xun Zhang <[email protected]>
.should(QueryBuilders.termQuery(STATE_FIELD, RUNNING))
);

SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder().query(boolQuery);
Copy link
Collaborator

@ylwu-amzn ylwu-amzn Oct 16, 2024

Choose a reason for hiding this comment

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

minor: Since we only need total hits, suggest add size as 0 to avoid returning documents detail content.

searchSourceBuilder.size(0);

You can fix in next PR

@Zhangxunmt Zhangxunmt merged commit caeacf7 into opensearch-project:2.17 Oct 17, 2024
8 of 11 checks passed
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