[email protected] has posted comments on this change. ( https://gerrit.cloudera.org/25287 )
Change subject: IMPALA-15737: Check for cancellation in hash join probe loops ...................................................................... Patch Set 1: What was verified 1. Production motivation (Impala 4.5.0, before this change). Two queries with a many-to-many hash join whose other join conjuncts (LIKE on concatenated strings) were mostly false were cancelled by the coordinator (one by a client close, one by an exec time limit). The executors logged "Cancelling fragment instances as directed by the coordinator", but the fragment instances kept running for ~19 hours in ProcessProbeBatch(), holding ~485 GB per executor (82 GB reservation + 402 GB untracked expression results, i.e. the growth IMPALA-14863 bounds). Other queries on those executors then failed with "Failed to get minimum memory reservation" until impalad was restarted. KILL QUERY could not stop them because the loop never observes cancellation. 2. Fix verified on a test cluster running 4.5.0 + IMPALA-14863 + this change. Reproduction is the IMPALA-14863 test shape (1,024 x 1,000,000 rows sharing one join key, conjuncts always false). The query profile confirmed the instance was inside the probe loop (BuildRows 1.00M, ProbeRows 1024, RowsReturned 0, 30 s elapsed). After KILL QUERY the executor's impala-server.num-fragments-in-flight dropped to 0 and the query disappeared from /memz within 1 second. Without the change the same synthetic query keeps its fragment alive until the probe batch is fully processed (minutes). 3. Production soak. The change (backported onto 4.5.0 together with IMPALA-14863) has been running on hundreds of executors across several clusters for two weeks. Executor logs were scanned for the same query_id repeating "Cancelling fragment instances" every status report interval (5 s) for 5 minutes or more. No hash-join-related lingering was found; the only case over 5 minutes was unrelated (a 17-minute LLVM codegen of a huge CASE expression, i.e. IMPALA-13290). 4. Performance. Not benchmarked separately. The per-row cost is a counter increment and a predicted branch (an atomic load every 1024 rows), below the existing per-row ClearExprResultsPool call. No regressions during the two-week soak. Happy to run a benchmark if needed. Could someone run gerrit-verify-dryrun? -- To view, visit https://gerrit.cloudera.org/25287 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3f65f54588a7349d0255f94234884aea7cd5551e Gerrit-Change-Number: 25287 Gerrit-PatchSet: 1 Gerrit-Owner: Anonymous Coward <[email protected]> Gerrit-Reviewer: Anonymous Coward <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Comment-Date: Wed, 04 Nov 2026 12:51:27 +0000 Gerrit-HasComments: No
