databend
databend copied to clipboard
bug: spill wrong result and hang
Summary
How to reproduce
set join_spilling_memory_ratio = 1;
set join_spilling_bytes_threshold_per_proc = 1;
set join_spilling_buffer_threshold_per_proc_mb = 1;
set sort_spilling_memory_ratio = 1;
set sort_spilling_bytes_threshold_per_proc = 1;
set aggregate_spilling_memory_ratio = 1;
set aggregate_spilling_bytes_threshold_per_proc = 1;
set window_partition_spilling_memory_ratio = 1;
set window_partition_spilling_bytes_threshold_per_proc = 1;
Wrong result
- Load ci TPC-DS SF1.
- Execute TPC-DS Q39.
Hang
- Start the Databend cluster.
- Comment out lines 9 and 10 in
ci-run-sqllogic-tests.sh. - Create a file named
spill.testin thetests/sqllogictests/suites/tpchdirectory. -
./scripts/ci/ci-run-sqllogic-tests.sh tpch
spill.test
# TPC-H spill test
statement ok
set sandbox_tenant = 'test_tenant';
statement ok
use tpch_test;
statement ok
set join_spilling_memory_ratio = 1;
statement ok
set join_spilling_bytes_threshold_per_proc = 1;
statement ok
set join_spilling_buffer_threshold_per_proc_mb = 1;
statement ok
set sort_spilling_memory_ratio = 1;
statement ok
set sort_spilling_bytes_threshold_per_proc = 1;
statement ok
set aggregate_spilling_memory_ratio = 1;
statement ok
set aggregate_spilling_bytes_threshold_per_proc = 1;
statement ok
set window_partition_spilling_memory_ratio = 1;
statement ok
set window_partition_spilling_bytes_threshold_per_proc = 1;
# TPC-H TEST
include ./queries.test
statement ok
set join_spilling_memory_ratio = 60;
statement ok
set join_spilling_bytes_threshold_per_proc = 0;
statement ok
set join_spilling_buffer_threshold_per_proc_mb = 512;
statement ok
set sort_spilling_memory_ratio = 60;
statement ok
set sort_spilling_bytes_threshold_per_proc = 0;
statement ok
set aggregate_spilling_memory_ratio = 60;
statement ok
set aggregate_spilling_bytes_threshold_per_proc = 0;
statement ok
set window_partition_spilling_memory_ratio = 60;
statement ok
set window_partition_spilling_bytes_threshold_per_proc = 0;