-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Enable failure recovery for Delta connector #11666
Conversation
plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/DeltaLakeQueryRunner.java
Outdated
Show resolved
Hide resolved
@@ -187,6 +191,7 @@ public static DistributedQueryRunner createDockerizedDeltaLakeQueryRunner( | |||
.build(); | |||
|
|||
DistributedQueryRunner.Builder<?> builder = DistributedQueryRunner.builder(session); | |||
coordinatorProperties.forEach(builder::setSingleCoordinatorProperty); |
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.
why not setCoordinatorProperties
?
(also,. move after extra)
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.
why not setCoordinatorProperties?
so we are not overriding props for keys we do not care about, shoud there be some.
{ | ||
Session defaultSession = getQueryRunner().getDefaultSession(); | ||
return Session.builder(defaultSession) | ||
.setSystemProperty(ENABLE_DYNAMIC_FILTERING, Boolean.toString(enabled)) | ||
.setSystemProperty(JOIN_REORDERING_STRATEGY, NONE.name()) | ||
.setSystemProperty(JOIN_DISTRIBUTION_TYPE, PARTITIONED.name()) | ||
.setCatalogSessionProperty(defaultSession.getCatalog().orElseThrow(), "dynamic_filtering_wait_timeout", "1h") |
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.
This was added in 504c9cf ....
plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergFailureRecoveryTest.java
Show resolved
Hide resolved
@@ -812,14 +812,13 @@ private static StageStats getRootStage(MaterializedResult result) | |||
return requireNonNull(statementStats.getRootStage(), "root stage is null"); | |||
} | |||
|
|||
private Session enableDynamicFiltering(boolean enabled) | |||
protected Session enableDynamicFiltering(boolean enabled) |
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.
Isn't DF enabled by default?
Why do we have this method?
Why is it also disabling CBO?
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.
@raunaqmorarka can you comment on this one? You introduced this test initially.
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.
CBO is disabled in DF tests so that the join order remains the syntactic one. We usually want to follow the test writer's intent about which table they put on probe and build for DF tests (e.g. sometimes we want to test with large build tables).
DF is enabled by default, except when task retries are enabled. I added this method so that I can test joins with and without DF explicitly in the retries mode.
...n/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaFailureRecoveryTest.java
Show resolved
Hide resolved
...n/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaFailureRecoveryTest.java
Show resolved
Hide resolved
...n/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaFailureRecoveryTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/DeltaLakeQueryRunner.java
Outdated
Show resolved
Hide resolved
public class TestDeltaTaskFailureRecoveryTest | ||
extends BaseDeltaFailureRecoveryTest |
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.
Is this the only subclass of BaseDeltaFailureRecoveryTest
?
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.
Yeah - I considered adding also TestDeltaQueryFailureRecoveryTest.java
but I am not convinced it is necessary. @arhimondr if you agree I will flatten the hierarchy.
b4b8d9a
to
5bf6906
Compare
1914711
to
7719cfa
Compare
7719cfa
to
1cc5d83
Compare
1cc5d83
to
b43e7c1
Compare
Session session = super.enableDynamicFiltering(enabled); | ||
return Session.builder(session) | ||
// Ensure probe side scan wait until DF is collected | ||
.setCatalogSessionProperty(session.getCatalog().orElseThrow(), "dynamic_filtering_wait_timeout", "1h") |
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.
Description
Enable failure recovery and test coverage for it for Delta connector
improvement
Delta connector
Related issues, pull requests, and links
FIxes: #11591
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
( ) Release notes entries required with the following suggested text: