apache / pinot

Apache Pinot - A realtime distributed OLAP datastore
https://pinot.apache.org/
Apache License 2.0
5.31k stars 1.24k forks source link

Flaky Test PinotFSSegmentUploaderTest #10910

Open ankitsultana opened 1 year ago

ankitsultana commented 1 year ago

Saw this in my PR: https://github.com/apache/pinot/actions/runs/5261333672/jobs/9509328866?pr=10895

[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.922 s - in org.apache.pinot.core.data.manager.realtime.RealtimeConsumptionRateManagerTest
[INFO] org.apache.pinot.core.data.manager.realtime.RealtimeConsumptionRateManagerTest.testBuildCache  Time elapsed: 1.201 s
[INFO] org.apache.pinot.core.data.manager.realtime.RealtimeConsumptionRateManagerTest.testCreateRateLimiter  Time elapsed: 0.007 s
[INFO] org.apache.pinot.core.data.manager.realtime.RealtimeConsumptionRateManagerTest.testMetricEmitter  Time elapsed: 0.173 s
[INFO] Running org.apache.pinot.core.data.manager.realtime.PinotFSSegmentUploaderTest
Error:  OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
00:17:05.037 ERROR [PinotFSSegmentUploader] [main] Missing segment store uri. Failed to upload segment file ca980508-3706-464a-be4b-61911ea87e60 for test_REALTIME__1__0__20230614T0017Z.
00:17:05.161 WARN [PinotFSSegmentUploader] [main] Timed out waiting to upload segment: test_REALTIME__1__0__20230614T0017Z for table: test
00:17:05.296 WARN [PinotFSSegmentUploader] [main] Timed out waiting to upload segment: test_REALTIME__1__0__20230614T0017Z for table: test
Error:  Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.286 s <<< FAILURE! - in org.apache.pinot.core.data.manager.realtime.PinotFSSegmentUploaderTest
Error:  org.apache.pinot.core.data.manager.realtime.PinotFSSegmentUploaderTest.testNoSegmentStoreConfigured  Time elapsed: 0.01 s
Error:  org.apache.pinot.core.data.manager.realtime.PinotFSSegmentUploaderTest.testSegmentAlreadyExist  Time elapsed: 0.132 s  <<< FAILURE!
java.lang.NullPointerException: Cannot invoke "java.net.URI.toString()" because "segmentURI" is null
    at org.apache.pinot.core.data.manager.realtime.PinotFSSegmentUploaderTest.testSegmentAlreadyExist(PinotFSSegmentUploaderTest.java:77)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    ...

cc: @Jackie-Jiang : should we just bump the timeout for this test? I guess it may happen if the VM this is running on is super slow

Jackie-Jiang commented 1 year ago

Yeah, I can see the timeout is set pretty aggressive (100ms). We can definitely make it longer

mcvsubbu commented 1 year ago

I would prefer that we write unit tests to test the uploadSegment() method in PinotFSSegmentUploader class. Can we try to avoid sleeps in test? There is no right value for timeout since it can fail in some environment or another