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

Flaky test TestMemoryConnectorTest.testCustomMetricsScanFilter #8691

Closed
findepi opened this issue Jul 28, 2021 · 17 comments · Fixed by #9336 or #19951
Closed

Flaky test TestMemoryConnectorTest.testCustomMetricsScanFilter #8691

findepi opened this issue Jul 28, 2021 · 17 comments · Fixed by #9336 or #19951
Labels
bug Something isn't working

Comments

@findepi
Copy link
Member

findepi commented Jul 28, 2021

https://github.com/trinodb/trino/runs/3179633364

Error:  testCustomMetricsScanFilter(io.trino.plugin.memory.TestMemoryConnectorTest)  Time elapsed: 0.125 s  <<< FAILURE!
org.junit.ComparisonFailure: expected:<LongCount{total=[2000]}> but was:<LongCount{total=[1001]}>
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at io.trino.plugin.memory.TestMemoryConnectorTest.testCustomMetricsScanFilter(TestMemoryConnectorTest.java:156)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

cc @rzeyde-varada

@findepi
Copy link
Member Author

findepi commented Jul 28, 2021

https://github.com/trinodb/trino/runs/3181603026 cc @rzeyde-varada

Error:  testCustomMetricsScanFilter(io.trino.plugin.memory.TestMemoryConnectorTest)  Time elapsed: 0.179 s  <<< FAILURE!
org.junit.ComparisonFailure: expected:<LongCount{total=[2000]}> but was:<LongCount{total=[1001]}>
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at io.trino.plugin.memory.TestMemoryConnectorTest.testCustomMetricsScanFilter(TestMemoryConnectorTest.java:156)

@rzeyde-varada
Copy link
Contributor

Reproduced locally (failed 2 out of 10k runs of testCustomMetricsScanFilter)

org.junit.ComparisonFailure: 
Expected :LongCount{total=2000}
Actual   :LongCount{total=1502}

	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at io.trino.plugin.memory.TestMemoryConnectorTest.testCustomMetricsScanFilter(TestMemoryConnectorTest.java:154)

@rzeyde-varada
Copy link
Contributor

rzeyde-varada commented Jul 29, 2021

testCustomMetricsScanOnly also failed locally 3 times (out of 10k runs) with:

org.junit.ComparisonFailure: 
Expected :LongCount{total=2000}
Actual   :LongCount{total=1162}
(happened twice)

org.junit.ComparisonFailure: 
Expected :LongCount{total=2000}
Actual   :LongCount{total=1834}
(happened once)

@rzeyde-varada
Copy link
Contributor

It seems that also OperatorStats#getInputPositions (which is a "non-custom metric") aggregation returns the wrong result when the above error occurs:

inputRows: 1834
metrics: {rows=LongCount{total=1834}, finished=LongCount{total=8}, started=LongCount{total=8}}

org.junit.ComparisonFailure: 
Expected :LongCount{total=2000}
Actual   :LongCount{total=1834}

I have used the following snippet to compute the total input positions:
rzeyde-varada@4399126#diff-920e9ca800575089f913cc4063da9962bfe7bd4adbd617668c973a7004cd2c99R178

@findepi
Copy link
Member Author

findepi commented Jul 29, 2021

Is it another incarnation of #5172?
We have marked many tests as @Flaky attributing flakiness to that issue.

@findepi
Copy link
Member Author

findepi commented Jul 29, 2021

cc @sopel39

@findepi
Copy link
Member Author

findepi commented Aug 2, 2021

see #8739 (comment)

@findepi
Copy link
Member Author

findepi commented Aug 24, 2021

@findepi
Copy link
Member Author

findepi commented Aug 24, 2021

@findepi
Copy link
Member Author

findepi commented Aug 26, 2021

@findepi
Copy link
Member Author

findepi commented Sep 16, 2021

@findepi
Copy link
Member Author

findepi commented Sep 21, 2021

@findepi
Copy link
Member Author

findepi commented Sep 22, 2021

@ebyhr
Copy link
Member

ebyhr commented Oct 8, 2021

@wendigo
Copy link
Contributor

wendigo commented Oct 11, 2021

@findepi
Copy link
Member Author

findepi commented Oct 11, 2021

closed this in #9336 18 days ago

seems it wasn't sufficient, per above

@ebyhr
Copy link
Member

ebyhr commented Oct 13, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
4 participants