Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change locaton of TableScan::getOutput() 'should exit' check. (facebo…
…okincubator#11085) Summary: Pull Request resolved: facebookincubator#11085 In some queries the eval can take considerable time inside DataSource::next which is being called in the infinite loop in TableScan::getOutput(). We've seen cases (with 100K character regex) when driver thread spends 20+ seconds on 1600 rows. We had a check that would force TableScan::getOutput() exit to avoid spending too much time executing w/o exiting. But this check is under the if (needNewSplit_) {} condition and might not be called for quite a long time. This is what we've observed in our corner case query. After a while the operator (driver) is considered to be stuck and then worker can get taken off cluster and query can get cancelled, while nothing is really stuck. In additon the query will hog multiple execution threads and can starve other queries/tasks. This change is putting the 'should exit' check in the beginning of the loop, so we call it no matter if we need a new split or not. Reviewed By: Yuhta Differential Revision: D63363269 fbshipit-source-id: f943a904fb0725843bf5a0f7e755e782c247ba45
- Loading branch information