Skip to content

Fix flaky TestPrometheusIntegrationStatus.testPushDown #10778

Merged
ebyhr merged 2 commits intotrinodb:masterfrom
ebyhr:ebi/prometheus-tests
Jan 26, 2022
Merged

Fix flaky TestPrometheusIntegrationStatus.testPushDown #10778
ebyhr merged 2 commits intotrinodb:masterfrom
ebyhr:ebi/prometheus-tests

Conversation

@ebyhr
Copy link
Copy Markdown
Member

@ebyhr ebyhr commented Jan 25, 2022

Fixes #7224

ebyhr added 2 commits January 25, 2022 15:37
Additionally, set http-server.http.port as 8080 in the main method.
The interval might be shorter than 15s, so it returns 1 or 2 row.
@ebyhr
Copy link
Copy Markdown
Member Author

ebyhr commented Jan 25, 2022

@ebyhr ebyhr requested a review from hashhar January 25, 2022 08:22
{
// default interval on the `up` metric that Prometheus records on itself is 15 seconds, so this should only yield one row
// default interval on the `up` metric that Prometheus records on itself is about 15 seconds, so this should only yield one or two row
MaterializedResult results = computeActual("SELECT * FROM prometheus.default.up WHERE timestamp > (NOW() - INTERVAL '15' SECOND)");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we instead create a timestamp literal in Java side and then send that as the predicate.
In the MaterializedResult then we can assert that all rows have a timestamp > the predicate (instead of counting number of rows which is inherently flaky).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also if we want to test pushdown happenned we should assert on the plan. Since even without pushdown the engine will filter results and we'll get filtered rows.

It's pre-existing issue though.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Let me punt to #10784

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we have some stress test results somewhere? LGTM.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Tested locally because the failure ratio was very low (1 / 500 attempts) in my laptop. Verified 2000 passes with this fix.

@ebyhr ebyhr merged commit f28a407 into trinodb:master Jan 26, 2022
@ebyhr ebyhr deleted the ebi/prometheus-tests branch January 26, 2022 00:12
@github-actions github-actions bot added this to the 370 milestone Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Flaky TestPrometheusIntegrationStatus

2 participants