-
Notifications
You must be signed in to change notification settings - Fork 2k
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 simultaneously creating a snapshot and updating the repository can potentially trigger an infinite loop #17532
base: main
Are you sure you want to change the base?
Conversation
3185a72
to
2a17f65
Compare
❌ Gradle check result for 2a17f65: 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? |
0a9da2d
to
42e3000
Compare
❌ Gradle check result for d766eb3: 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? |
d766eb3
to
2757776
Compare
❌ Gradle check result for 2757776: 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? |
2757776
to
f234048
Compare
❌ Gradle check result for f234048: 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? |
f234048
to
7957cdb
Compare
❕ Gradle check result for 7957cdb: 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 #17532 +/- ##
============================================
+ Coverage 72.40% 72.41% +0.01%
+ Complexity 65828 65777 -51
============================================
Files 5316 5316
Lines 305294 305339 +45
Branches 44289 44294 +5
============================================
+ Hits 221033 221100 +67
+ Misses 66187 66111 -76
- Partials 18074 18128 +54 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ResourceAwareTasksTests.testTaskResourceTrackingDuringTaskCancellation ##14293 |
@Override | ||
public void executeConsistentStateUpdate( | ||
Function<RepositoryData, ClusterStateUpdateTask> createUpdateTask, | ||
String source, | ||
Supplier<Repository> currentRepositeSupplier, |
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.
I don't want to change the API, I'm wondering if we can retry in SnapshotsService
, that is, re-call the createSnapshot
method when startRepository != currentRepository
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.
It seems that there is no elegant way to exit unless the executeConsistentStateUpdate
is modified.
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.
I think you can use the onFailure
to do retry in SnapshotService
. When this repo is closed, not to re-call the executeConsistentStateUpdate
and invoke the onFailure
.
7957cdb
to
b054499
Compare
❌ Gradle check result for b054499: 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? |
S3RemoteStoreIT.testPeerRecoveryWithLowActivityTimeout #16145 |
b054499
to
b3e8d32
Compare
❌ Gradle check result for b3e8d32: 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? |
b3e8d32
to
d0ae308
Compare
❌ Gradle check result for d0ae308: 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? |
d0ae308
to
27de151
Compare
❕ Gradle check result for 27de151: 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. |
27de151
to
53a2e8c
Compare
❌ Gradle check result for 53a2e8c: 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? |
@@ -643,6 +646,10 @@ public void executeConsistentStateUpdate( | |||
String source, | |||
Consumer<Exception> onFailure | |||
) { | |||
if (this.isOpen() == false) { | |||
onFailure.accept(new RepositoryException(metadata.name(), "the repository is closed, maybe updated or deleted, please retry")); |
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.
I think it's ok to throw exception here, we just need to notify the user that the repo have changed and let the user decide whether to retry or not.
@@ -4690,6 +4697,11 @@ private void checkAborted() { | |||
} | |||
} | |||
|
|||
@Override | |||
public boolean isOpen() { |
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.
I don't think we need this method, we can track the state within this class
Signed-off-by: kkewwei <[email protected]> Signed-off-by: kkewwei <[email protected]>
53a2e8c
to
0ad9642
Compare
❕ Gradle check result for 0ad9642: 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. |
DedicatedClusterSnapshotRestoreIT.testSnapshotWithStuckNode #15806 |
Description
Related Issues
Resolves #17531
Check List
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.