-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[bug][storage] Make ES-Rollover idempotent by checking if the index or alias already exist #6638
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6638 +/- ##
=======================================
Coverage 96.03% 96.03%
=======================================
Files 364 364
Lines 20675 20696 +21
=======================================
+ Hits 19855 19876 +21
Misses 626 626
Partials 194 194
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@yurishkuro I think, even this approach can lead to the error described in the issue. An index might not exist but still pointed by an alias. Should we ignore that error in init (as that means rollover has taken place already)? I intially thought that index existence could fix this but I may be wrong. So I want to take your views over ignoring this error in init. |
@mahadzaryab1 Can you please review this PR and solve this doubt #6638 (comment) ? |
17fb942
to
96297dd
Compare
Fixing e2e tests |
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.
please remove the binary cmd/esmapping-generator/esmapping-generator-linux-amd64
code coverage is below threshold (the ES error responses are not covered by the test)
Signed-off-by: Manik2708 <[email protected]>
48b6a43
to
5951744
Compare
Signed-off-by: Manik2708 <[email protected]>
@yurishkuro Is there something I can do here for failing checks in merge queue? |
you could add a fix to the label check workflow in a new PR #6712 (comment) |
@yurishkuro Will it be ok to disable it? Because I don't have any reason to enable it for the commit. It makes sense in the PR but I am doubtful for the commit! Also, DCO check is failing! But I think for that we need to find a fix rather than removing it! |
Which problem is this PR solving?
Fixes: #6203
Description of the changes
es-rollover
checks for index existence through errors, it is mainly expecting the error:But it can lead to inconsistent results as found in the issue, where init was failing due to the error:
Here if we see carefully the error is coming due to existence of index but the reason is different.
es-rollover
is ready only forresource_already_exists_exception
but there are other errors also which can be generated due to this (like the above).The current way of marshalling error is unsafe, the safe way is: Check if index exists -> Create if not exists. This way the certained error (
resource_already_exists
is fixed) and the unavoidable error likeindex_name_exception
is ignored.How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test