Hi all,
I'm confused about the cancellation logic in hdfs scanners. There're two functions to detect cancellation: ScannerContext::cancelled() and RuntimeState::is_cancelled(). When MT_DOP is not set (i.e. MT_DOP=0), ScannerContext::cancelled() will return HdfsScanNode::done(). However, the field done_ in HdfsScanNode seems to be set according to status return from scanners. I've witnessed some points when RuntimeState::is_cancelled() is true but ScannerContext::cancelled() is false. My question is why scanners don't use RuntimeState::is_cancelled() to detect cancellation, which is more timely than using ScannerContext::cancelled(). There must be some detailed reasons that I've missed. Would you be so kind to answer my question? Thanks, Quanlong
