[Bug] Query export with SELECT * INTO OUTFILE does not properly close connection when enable_parallel_outfile = true
Search before asking
- [X] I had searched in the issues and found no similar issues.
Version
2.0.2
What's Wrong?
When exporting the results of a query using the INTO OUTFILE option to an S3 bucket with set enable_parallel_outfile = true;, Doris does not properly close the connection.
The client hangs waiting for the connection to close. The exported files are created and complete on the S3 bucket; however, the client still waits for the running query to close.
What You Expected?
Connection is close properly similar to when set enable_parallel_outfile = false
How to Reproduce?
set enable_parallel_outfile = true;
SELECT * FROM test INTO OUTFILE "s3://bucket/export/file_"
format as csv
properties
(
"s3.endpoint" = "https://xxx.com",
"s3.access_key" = "xxx",
"s3.secret_key" = "xxx",
"s3.region" = "US-EAST1"
);
Anything Else?
No response
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
You can use the explain statement to analyze execution. https://doris.apache.org/zh-CN/docs/dev/data-operate/export/outfile?_highlight=enable_parallel_outfile#%E5%A6%82%E4%BD%95%E9%AA%8C%E8%AF%81%E7%BB%93%E6%9E%9C%E9%9B%86%E8%A2%AB%E5%B9%B6%E5%8F%91%E5%AF%BC%E5%87%BA
Sure, the explain out doesn't appear to show anything abnormal to me.
Explain output of test query
Explain String
PLAN FRAGMENT 0
OUTPUT EXPRS:
<slot 2>
<slot 3>
<slot 4>
<slot 5>
PARTITION: UNPARTITIONED
""
VRESULT SINK
""
1:VEXCHANGE
offset: 0
""
PLAN FRAGMENT 1
OUTPUT EXPRS:
`id`
"PARTITION: HASH_PARTITIONED: `default_cluster:testdb`.`test_table`.`workspace_id`, `default_cluster:testdb`.`test_table`.`user_id`"
""
RESULT FILE SINK
FILE PATH: s3://test-bucket/export/file_
STORAGE TYPE: S3
""
0:VOlapScanNode
"TABLE: default_cluster:testdb.test_table(test_table), PREAGGREGATION: OFF. Reason: __DORIS_DELETE_SIGN__ is used as conjuncts. No AggregateInfo"
PREDICATES: `default_cluster:testdb`.`test_table`.`__DORIS_DELETE_SIGN__` = 0
"partitions=1/1, tablets=10/10, tabletList=699011,699013,699015 ..."
"cardinality=78803, avgRowSize=1707.2472, numNodes=1"
pushAggOp=NONE
show variables; Output
Variable_name,Value
SQL_AUTO_IS_NULL,false
allow_partition_column_nullable,true
auto_broadcast_join_threshold,0.8
auto_increment_increment,1
autocommit,true
batch_size,4064
be_number_for_test,-1
block_encryption_mode,""
broadcast_hashtable_mem_limit_percentage,0.2
broadcast_right_table_scale_factor,10.0
broadcast_row_count_limit,3.0E7
character_set_client,utf8
character_set_connection,utf8
character_set_results,utf8
character_set_server,utf8
check_overflow_for_decimal,false
codegen_level,0
collation_connection,utf8_general_ci
collation_database,utf8_general_ci
collation_server,utf8_general_ci
cpu_resource_limit,-1
default_order_by_limit,-1
default_password_lifetime,0
default_rowset_type,beta
default_storage_engine,olap
default_tmp_storage_engine,olap
delete_without_partition,false
disable_colocate_plan,false
disable_join_reorder,false
disable_nereids_rules,""
disable_streaming_preaggregations,false
div_precision_increment,4
drop_table_if_ctas_failed,true
dry_run_query,false
dump_nereids_memo,false
enable_analyze_complex_type_column,false
enable_bucket_shuffle_join,true
enable_bushy_tree,false
enable_cbo_statistics,false
enable_colocate_scan,false
enable_common_expr_pushdown,true
enable_cost_based_join_reorder,false
enable_count_on_index_pushdown,true
enable_cte_materialize,true
enable_dphyp_optimizer,false
enable_dphyp_trace,false
enable_eliminate_sort_node,true
enable_exchange_node_parallel_merge,false
enable_fallback_to_original_planner,true
enable_file_cache,false
enable_fold_constant_by_be,false
enable_fold_nondeterministic_fn,false
enable_function_pushdown,true
enable_infer_predicate,true
enable_insert_strict,true
enable_inverted_index_query,true
enable_local_exchange,true
enable_minidump,false
enable_nereids_dml,false
enable_nereids_timeout,true
enable_nereids_trace,false
enable_new_cost_model,false
enable_new_shuffle_hash_method,true
enable_odbc_transcation,false
enable_orc_lazy_materialization,true
enable_parallel_outfile,true
enable_parquet_lazy_materialization,true
enable_partition_cache,true
enable_partition_topn,true
enable_profile,false
enable_projection,true
enable_push_down_no_group_agg,true
enable_runtime_filter_prune,false
enable_scan_node_run_serial,false
enable_share_hash_table_for_broadcast_join,true
enable_single_distinct_column_opt,false
enable_spilling,false
enable_sql_cache,true
enable_strict_consistency_dml,false
enable_strong_consistency_read,false
enable_two_phase_read_opt,true
enable_unicode_name_support,false
enable_unified_load,false
enable_vectorized_engine,true
event_scheduler,OFF
exec_mem_limit,2147483648
experimental_enable_agg_state,false
experimental_enable_nereids_planner,false
experimental_enable_pipeline_engine,true
experimental_enable_single_replica_insert,false
external_agg_bytes_threshold,0
external_agg_partition_bits,8
external_sort_bytes_threshold,0
external_table_analyze_part_num,-1
extract_wide_range_expr,true
file_cache_base_path,random
file_split_size,0
forbid_unknown_col_stats,false
forward_to_master,true
fragment_transmission_compression_codec,lz4
group_by_and_having_use_alias_first,false
group_concat_max_len,2147483646
have_query_cache,false
init_connect,""
inline_cte_referenced_threshold,1
insert_timeout,14400
insert_visible_timeout_ms,10000
interactive_timeout,3600
internal_session,false
jdbc_clickhouse_query_final,false
language,/palo/share/english/
license,"Apache License, Version 2.0"
lower_case_table_names,0
max_allowed_packet,1048576
max_execution_time,-1
max_instance_num,64
max_join_number_bushy_tree,5
max_join_number_of_reorder,63
max_pushdown_conditions_per_column,-1
max_scan_key_num,-1
max_table_count_use_cascades_join_reorder,10
memo_max_group_expression_size,10000
nereids_cbo_penalty_factor,0.7
nereids_star_schema_support,true
nereids_trace_event_mode,all
net_buffer_length,16384
net_read_timeout,60
net_write_timeout,600
nth_optimized_plan,1
parallel_exchange_instance_num,-1
parallel_fragment_exec_instance_num,1
parallel_pipeline_task_num,0
parallel_sync_analyze_task_num,2
partition_pruning_expand_threshold,10
partitioned_hash_agg_rows_threshold,0
partitioned_hash_join_rows_threshold,0
password_history,0
performance_schema,OFF
plan_nereids_dump,false
prefer_join_method,broadcast
query_cache_size,1048576
query_cache_type,0
query_timeout,300
repeat_max_num,10000
resource_group,""
return_object_data_as_binary,false
rewrite_count_distinct_to_bitmap_hll,true
rewrite_or_to_in_predicate_threshold,2
round_precise_decimalv2_value,false
runtime_bloom_filter_max_size,16777216
runtime_bloom_filter_min_size,1048576
runtime_bloom_filter_size,2097152
runtime_filter_max_in_num,1024
runtime_filter_mode,GLOBAL
runtime_filter_type,IN_OR_BLOOM_FILTER
runtime_filter_wait_time_ms,1000
runtime_filters_max_num,10
scan_queue_mem_limit,107374182
send_batch_parallelism,1
session_context,""
show_hidden_columns,false
show_user_default_role,false
skip_delete_bitmap,false
skip_delete_predicate,false
skip_delete_sign,false
skip_storage_engine_merge,false
sql_mode,STRICT_TRANS_TABLES
sql_quote_show_create,true
sql_safe_updates,0
sql_select_limit,9223372036854775807
storage_engine,olap
system_time_zone,Etc/UTC
time_zone,Etc/UTC
topn_opt_limit_threshold,1024
trace_nereids,false
transaction_isolation,REPEATABLE-READ
transaction_read_only,false
trim_tailing_spaces_for_external_table_query,false
truncate_char_or_varchar_columns,false
tx_isolation,REPEATABLE-READ
tx_read_only,false
use_fix_replica,-1
use_rf_default,false
use_v2_rollup,false
validate_password_policy,NONE
version,5.7.99
version_comment,Doris version doris-2.0.1.1-ea0bfb25c9
wait_timeout,28800
workload_group,""
我也有同样问题,不仅仅是开启并发导出时候客户端不退出,在执行任何超过10分钟的sql的情况下,客户端都不会退出
I tested latest 2.0 and master, no problem
We're closing this issue because it hasn't been updated in a while. If you'd like to revive this issue, please reopen it and feel free a maintainer to remove the Stale tag!