I've been chasing a flaky test that I saw in test_basic_runtime_filters when running against https://gerrit.cloudera.org/#/c/8966/ (the scanner buffer pool changes).
I think it is a latent bug that has started reproducing more frequently. What I've found is:
- Different queries fail with CANCELLED. I can repro it on my branch ~3/4 times by running: impala-py.test tests/query_test/test_runtime_filters.py -n8 --verbose --maxfail 1 -k basic . It happens with a variety of queries and file formats.
- It seems to happen when all files are pruned out by runtime filters
- Logging reveals IssueInitialRanges() fails with a CANCELLED status, which propagates up to the query status:
- It appears that the CANCELLED comes from DiskIoMgr::AddScanRanges().
- That function returned cancelled because a scanner thread noticed that the scan was complete here and cancelled the RequestContext: