databendlabs / databend

𝗗𝗮𝘁𝗮, 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀 & 𝗔𝗜. Modern alternative to Snowflake. Cost-effective and simple for massive-scale analytics. https://databend.com
https://docs.databend.com
Other
7.85k stars 750 forks source link

New planner's query_log doesn't log correctly #6902

Closed Xuanwo closed 2 years ago

Xuanwo commented 2 years ago

HTTP Handler's test_bad_sql test failed:

test servers::http::http_query_handlers::test_bad_sql ... FAILED

failures:

---- servers::http::http_query_handlers::test_bad_sql stdout ----
thread 'servers::http::http_query_handlers::test_bad_sql' panicked at 'assertion failed: `(left == right)`: QueryResponse { id: "3e20602d-2334-4d3e-9ccd-366470f5e3ac", session_id: Some("2364d19f-17dc-4ed8-95f8-826bb5a03c2f"), session: Some(HttpSessionConf { database: None, keep_server_session_secs: None, settings: Some({"enable_planner_v2": "0"}) }), schema: Some(DataSchema { fields: [DataField { name: "query_text", data_type: String, nullable: false }, DataField { name: "exception_code", data_type: Int32, nullable: false }, DataField { name: "exception_text", data_type: String, nullable: false }, DataField { name: "stack_trace", data_type: String, nullable: false }], metadata: {} }), data: [], state: Succeeded, error: None, stats: QueryStats { progresses: Progresses { scan_progress: ProgressValues { rows: 1, bytes: 1081 }, write_progress: ProgressValues { rows: 0, bytes: 0 }, result_progress: ProgressValues { rows: 0, bytes: 24 } }, running_time_ms: 35.167078 }, affect: None, stats_uri: Some("/v1/query/3e20602d-2334-4d3e-9ccd-366470f5e3ac"), final_uri: Some("/v1/query/3e20602d-2334-4d3e-9ccd-366470f5e3ac/final"), next_uri: None, kill_uri: Some("/v1/query/3e20602d-2334-4d3e-9ccd-366470f5e3ac/kill") }

Diff < left / right > :
<0
>1

', query/tests/it/servers/http/http_query_handlers.rs:228:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
flaneur2020 commented 2 years ago

the in-memory query_log is not used in the log collecting sceneries, I think it's ok to disable it temporarily, then add it back again when we need it.

sundy-li commented 2 years ago

we can set max_query_log_size = 0 in query config to disable the query_log.

This test will be commented util we remove See you again stmt.

Xuanwo commented 2 years ago

query log has added again.