-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix issue of red index on close for remote enabled clusters #15990
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ashish Singh <ssashish@amazon.com>
❌ Gradle check result for a1d5a87: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
I have added tests for the edge case that is mentioned in the referenced issue. I had added the tests first and then the main code changes -
|
❌ Gradle check result for ac864f0: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Ashish Singh <ssashish@amazon.com>
ac864f0
to
29cf87f
Compare
Signed-off-by: Ashish Singh <ssashish@amazon.com>
❌ Gradle check result for 29cf87f: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Fixed this. |
❕ Gradle check result for 4420487: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15990 +/- ##
============================================
- Coverage 71.90% 71.86% -0.05%
+ Complexity 64392 64351 -41
============================================
Files 5278 5278
Lines 300877 300886 +9
Branches 43478 43478
============================================
- Hits 216351 216218 -133
- Misses 66747 66920 +173
+ Partials 17779 17748 -31 ☔ View full report in Codecov by Sentry. |
Description
The close index operation involves following steps -
During a happy index close, we upload translog twice -
However, if there is a flush that has happened after the operation landed in the Lucene buffer but before the buffered sync (for sync translog) or the periodic async sync (for async translog), then the steps 3(a) and 3(b) becomes no-op and the GCP uploaded in the checkpoint file would be the one from the last translog sync. This causes the discrepancy between maxSeqNo and GCP and causing exception while creating ReadOnlyEngine leading to red index.
In this PR, we do a force Sync during close index to ensure that we have uploaded the translog with the latest global checkpoint.
Related Issues
Resolves #15989
Check List
[ ] API changes companion pull request created, if applicable.[ ] Public documentation issue/PR created, if applicable.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.