mirror of
https://github.com/apache/impala.git
synced 2026-02-02 06:00:36 -05:00
The estimate for memory consumption for this scan is 9 columns * 384kb per column = 3.375mb. So if we set the mem_limit to 6.5mb, we should still not get more than one scanner thread, but we can avoid hitting out-of-memory. The issue in the JIRA was queued row batches. With this change, and num_scanner_threads=2, there should be max 12 row batches (10 in the queue, 2 in the scanner threads about to be enqueued) and based on the column stats I'd estimate that each row batch is around 200kb, so this change should provide significantly more headroom. Change-Id: I6d992cc076bc8678089f765bdffe92e877e9d229 Reviewed-on: http://gerrit.cloudera.org:8080/11513 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
====
|
|
---- QUERY
|
|
# IMPALA-7076: this query will fail if the Kudu scan spins up too many scanner threads.
|
|
# Only one scanner thread per impalad should be started.
|
|
# Set num_scanner_threads to reduce the row batch queue length and avoid IMPALA-7465.
|
|
set num_scanner_threads=2;
|
|
set mem_limit="6.5mb";
|
|
select * from tpch_kudu.orders
|
|
order by o_orderkey limit 3;
|
|
---- TYPES
|
|
BIGINT,BIGINT,STRING,DECIMAL,STRING,STRING,STRING,INT,STRING
|
|
---- RESULTS
|
|
1,36901,'O',173665.47,'1996-01-02','5-LOW','Clerk#000000951',0,'nstructions sleep furiously among '
|
|
2,78002,'O',46929.18,'1996-12-01','1-URGENT','Clerk#000000880',0,' foxes. pending accounts at the pending, silent asymptot'
|
|
3,123314,'F',193846.25,'1993-10-14','5-LOW','Clerk#000000955',0,'sly final accounts boost. carefully regular ideas cajole carefully. depos'
|
|
---- RUNTIME_PROFILE
|
|
aggregation(SUM, NumScannerThreadsStarted): 3
|
|
====
|
|
---- QUERY
|
|
# Test with lower limit that reliably hits memory limit exceeded.
|
|
set disable_codegen=true;
|
|
set mem_limit=32k;
|
|
select * from tpch_kudu.orders
|
|
order by o_orderkey limit 3;
|
|
---- CATCH
|
|
Memory limit exceeded
|
|
====
|