…exception during the process of building a hash table (#2887)
DRILL-8483: SpilledRecordBatch memory leak when the program threw an exception during the process of building a hash table
Description
During the process of reading data from disk to building hash tables in memory, if an exception is thrown, it will result in a memory SpilledRecordBatch leak
there is no sql runing
(Please describe user-visible changes similar to what should appear in the Drill documentation.)
Testing
prepare data for tpch 1s
30 concurrent for tpch sql8
set direct memory 5g
when it had OutOfMemoryException , stopped all sql.
finding memory leak
test script
random_sql(){
#for i in `seq 1 3`
while true
do
num=$((RANDOM%22+1))
if [ -f $fileName ]; then
echo "$fileName" " is exit"
exit 0
else
$drill_home/sqlline -u \"jdbc:drillr:zk=ip:2181/drillbits_shf\" -f tpch_sql8.sql >> sql8.log 2>&1
fi
done
}
main(){
#sleep 2h
#TPCH power test
for i in `seq 1 30`
do
random_sql &
done
}
…exception during the process of building a hash table (#2887)
DRILL-8483: SpilledRecordBatch memory leak when the program threw an exception during the process of building a hash table
Description
During the process of reading data from disk to building hash tables in memory, if an exception is thrown, it will result in a memory SpilledRecordBatch leak there is no sql runing![image](https://github.com/apache/drill/assets/25974968/be52cde5-d954-4208-9e1a-741edf5af2ef)
memory![image](https://github.com/apache/drill/assets/25974968/541df1dd-fad4-4359-83ef-edb855efd552)
leak info
Documentation
(Please describe user-visible changes similar to what should appear in the Drill documentation.)
Testing
prepare data for tpch 1s
test script