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

feat: modify_refresh_interval flag in opensearch index_documents #2980

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

AvihaiSam
Copy link
Contributor

Feature

  • Feature

Detail

add modify_refresh_interval argument to opensearch's index_documents()
when set to False it won't try to modify refresh interval.
This argument is needed to be set to False if multiple workers write to the same index, which might disable refresh-interval due to race condition.
it's also possible that the backend role is not allowed to modify index settings (indices:admin/settings/update)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@AvihaiSam AvihaiSam changed the title feature/opensearch: modify_refresh_interval flag feature: opensearch: modify_refresh_interval flag Oct 1, 2024
@AvihaiSam AvihaiSam changed the title feature: opensearch: modify_refresh_interval flag feat: opensearch: modify_refresh_interval flag Oct 1, 2024
@AvihaiSam
Copy link
Contributor Author

related to #2981

@AvihaiSam AvihaiSam changed the title feat: opensearch: modify_refresh_interval flag feat(opensearch): modify_refresh_interval flag Oct 1, 2024
@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
  • Commit ID: c08d9f1
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubDistributedCodeBuild6-jWcl5DLmvupS
  • Commit ID: c08d9f1
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@jaidisido jaidisido changed the title feat(opensearch): modify_refresh_interval flag feat: modify_refresh_interval flag in opensearch index_documents Oct 2, 2024
@@ -504,6 +504,7 @@ def index_documents(
initial_backoff: int | None = None,
max_backoff: int | None = None,
use_threads: bool | int = False,
modify_refresh_interval: bool = True,
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good, but perhaps enable_refresh_interval is a better name?

Copy link
Contributor Author

@AvihaiSam AvihaiSam Oct 5, 2024

Choose a reason for hiding this comment

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

sure... whatever works for you...
pushed the changes...

@jaidisido jaidisido linked an issue Oct 2, 2024 that may be closed by this pull request
@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
  • Commit ID: f66c358
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubDistributedCodeBuild6-jWcl5DLmvupS
  • Commit ID: f66c358
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
  • Commit ID: fc7cefb
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubDistributedCodeBuild6-jWcl5DLmvupS
  • Commit ID: fc7cefb
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@jaidisido jaidisido merged commit 4074f25 into aws:main Oct 7, 2024
17 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.

feature: opensearch: allow disable modify refresh_interval
3 participants