Skip to content
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

Mitigate testDynamicFiltering* flakiness #18323

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import io.trino.testing.sql.SqlExecutor;
import io.trino.testing.sql.TestTable;
import io.trino.testing.sql.TestView;
import io.trino.testng.services.Flaky;
import org.intellij.lang.annotations.Language;
import org.testng.SkipException;
import org.testng.annotations.AfterClass;
Expand Down Expand Up @@ -1888,6 +1889,7 @@ public Object[][] fixedJoinDistributionTypes()
return new Object[][] {{BROADCAST}, {PARTITIONED}};
}

@Flaky(issue = "https://github.com/trinodb/trino/issues/18499", match = ".*SqlQueryManager.getFullQueryInfo.*")
@Test(dataProvider = "fixedJoinDistributionTypes")
public void testDynamicFiltering(JoinDistributionType joinDistributionType)
{
Expand All @@ -1897,6 +1899,7 @@ public void testDynamicFiltering(JoinDistributionType joinDistributionType)
joinDistributionType);
}

@Flaky(issue = "https://github.com/trinodb/trino/issues/18499", match = ".*SqlQueryManager.getFullQueryInfo.*")
@Test
public void testDynamicFilteringWithAggregationGroupingColumn()
{
Expand All @@ -1907,6 +1910,7 @@ public void testDynamicFilteringWithAggregationGroupingColumn()
PARTITIONED);
}

@Flaky(issue = "https://github.com/trinodb/trino/issues/18499", match = ".*SqlQueryManager.getFullQueryInfo.*")
@Test
public void testDynamicFilteringWithAggregationAggregateColumn()
{
Expand All @@ -1923,6 +1927,7 @@ public void testDynamicFilteringWithAggregationAggregateColumn()
isAggregationPushedDown);
}

@Flaky(issue = "https://github.com/trinodb/trino/issues/18499", match = ".*SqlQueryManager.getFullQueryInfo.*")
@Test
public void testDynamicFilteringWithAggregationGroupingSet()
{
Expand All @@ -1933,6 +1938,7 @@ public void testDynamicFilteringWithAggregationGroupingSet()
"ON a.orderkey = b.orderkey AND b.totalprice < 1000");
}

@Flaky(issue = "https://github.com/trinodb/trino/issues/18499", match = ".*SqlQueryManager.getFullQueryInfo.*")
@Test
public void testDynamicFilteringWithLimit()
{
Expand All @@ -1943,6 +1949,7 @@ public void testDynamicFilteringWithLimit()
"ON a.orderkey = b.orderkey AND b.totalprice < 1000");
}

@Flaky(issue = "https://github.com/trinodb/trino/issues/18499", match = ".*SqlQueryManager.getFullQueryInfo.*")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested this match is truely solving the flakiness?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. 20/20 runs passed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@Test
public void testDynamicFilteringDomainCompactionThreshold()
{
Expand Down Expand Up @@ -2071,8 +2078,14 @@ private Session dynamicFiltering(JoinDistributionType joinDistributionType, bool
.build();
}

/**
* This method relies on global state of QueryTracker. It may fail because of QueryTracker.pruneExpiredQueries()
* You must ensure that query was issued and this method invoked in isolation -
* which guarantees that there is less other queries between query creation and obtaining query info than `query.max-history`
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you add TODO and mention #18499? I would do it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo added.

private long getPhysicalInputPositions(QueryId queryId)
{
// TODO https://github.com/trinodb/trino/issues/18499
return getDistributedQueryRunner().getCoordinator()
.getQueryManager()
.getFullQueryInfo(queryId)
Expand Down