-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Core: Fix negation in requireStrictCleanup
#8675
Conversation
Found a regression that the snapshots are still around after the commit fails: trinodb/trino#19188 After the fix, I checked locally, the test passes.
Let me check this one in a bit. |
@@ -320,7 +320,7 @@ private void commitCreateTransaction() { | |||
|
|||
} catch (RuntimeException e) { | |||
// the commit failed and no files were committed. clean up each update | |||
if (!ops.requireStrictCleanup() || e instanceof CleanableFailure) { |
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.
Hm, isn't the existing logic correct? We should not clean up in strict mode unless it is CleanableFailure
? Is there a chance the test in Trino produced a commit error that we treat as unknown or unsafe to clean up?
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 the one that failed in Trino was testing SchemaNotFoundException
here.
@aokolnychyi Thanks, I'm not 100% sure if it is a regression or intended. A test is failing that seems to make sense. I can take a look tomorrow with fresh eyes, but another set of eyes is very much welcome. Feel free to take over the PR. |
I don't think this change is correct. The logic should continue to be to clean up if strict cleanup is not enabled. However, there is a behavior change here that is probably being hit by this test. We changed behavior and enabled strict cleanup for tables unless it is turned off by the catalog. This may leak files, but it is much safer and avoids table corruption on unknown exceptions. |
I think it is a difference in understanding, if it is strict in cleaning up the files, I would expect it to clean it up. Anyway, good that we have the test and it is expected. |
Found a regression that the snapshots are still around after the commit fails: trinodb/trino#19188
This is a result of: #8599 It was actually enabled before, but now it is disabled.
After the fix, I checked locally, the test passes: