Skip to content

Flaky UT: PrefetchableTextFilesFirehoseFactoryTest #12638

@paul-rogers

Description

@paul-rogers

Test failed on Travis, works on a Mac. Test passed on previous runs. No code in the PR changed anything in the code covered by this test.

[ERROR] Tests run: 13, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 73.209 s <<< FAILURE! - in org.apache.druid.data.input.impl.prefetch.PrefetchableTextFilesFirehoseFactoryTest
[ERROR] org.apache.druid.data.input.impl.prefetch.PrefetchableTextFilesFirehoseFactoryTest.testWithSmallCacheAndLargeFetch  Time elapsed: 60.066 s  <<< ERROR!
java.lang.RuntimeException: java.util.concurrent.TimeoutException
	at org.apache.druid.data.input.impl.prefetch.Fetcher.openObjectFromLocal(Fetcher.java:226)
	at org.apache.druid.data.input.impl.prefetch.Fetcher.next(Fetcher.java:177)
	at org.apache.druid.data.input.impl.prefetch.PrefetchableTextFilesFirehoseFactory$2.next(PrefetchableTextFilesFirehoseFactory.java:239)
	at org.apache.druid.data.input.impl.prefetch.PrefetchableTextFilesFirehoseFactory$2.next(PrefetchableTextFilesFirehoseFactory.java:225)
	at org.apache.druid.data.input.impl.FileIteratingFirehose.getNextLineIterator(FileIteratingFirehose.java:105)
	at org.apache.druid.data.input.impl.FileIteratingFirehose.hasMore(FileIteratingFirehose.java:66)
	at org.apache.druid.data.input.impl.prefetch.PrefetchableTextFilesFirehoseFactoryTest.testWithSmallCacheAndLargeFetch(PrefetchableTextFilesFirehoseFactoryTest.java:278)

I have observed other failures in "firehose" tests (can't recall if it is this same test), did some poking around, and noticed that the code, while using concurrency constructs, used them independently with no locking between the various objects. I suspect this leads to race conditions and occasional failures.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions