-
Notifications
You must be signed in to change notification settings - Fork 33
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
Wait after create index complete #949
Wait after create index complete #949
Conversation
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
flint-core/src/main/scala/org/opensearch/flint/core/storage/FlintOpenSearchClient.java
Show resolved
Hide resolved
flint-core/src/main/scala/org/opensearch/flint/core/storage/FlintOpenSearchClient.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the consideration of constant wait_after VS retry?
Actually we need both. AOSS internal workflow will also conflict with our update mapping call, and in that case our mapping call will just fail. We can use backoff retry as main method to avoid conflict, and wait_after as a configurable adjustment in production if we consistently see conflict happening within x seconds of index creation. |
confirmed working in gamma |
* wait after create index complete Signed-off-by: Sean Kao <[email protected]> * add default wait time for aoss Signed-off-by: Sean Kao <[email protected]> --------- Signed-off-by: Sean Kao <[email protected]> (cherry picked from commit 62b6c5f) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* wait after create index complete * add default wait time for aoss --------- (cherry picked from commit 62b6c5f) Signed-off-by: Sean Kao <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* wait after create index complete Signed-off-by: Sean Kao <[email protected]> * add default wait time for aoss Signed-off-by: Sean Kao <[email protected]> --------- Signed-off-by: Sean Kao <[email protected]>
Description
Add a new spark config
spark.datasource.flint.request.completionDelayMillis
to set a wait time after OpenSearch index creation is complete.It's set to 2000 if using aoss service by default, otherwise it's 0.
Related Issues
Testing
Create index with default config
Create index with config
--conf spark.datasource.flint.request.completionDelayMillis=2000
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.