This is an automated email from the ASF dual-hosted git repository.
hello-stephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new d3bf6b89bde [fix](cloud) Fix SchemaVariablesScanner crash due to
incomplete FE response (#65994)
d3bf6b89bde is described below
commit d3bf6b89bdedfa38d17d99c287c2c1b37304cd9f
Author: deardeng <[email protected]>
AuthorDate: Fri Jul 24 18:40:27 2026 +0800
[fix](cloud) Fix SchemaVariablesScanner crash due to incomplete FE response
(#65994)
Problem Summary: When the Thrift connection to FE is unstable, a
partially deserialized TShowVariableResult can contain variable rows
with fewer than four fields. SchemaVariablesScanner accessed fields 0
through 3 unconditionally and could crash the BE process. Validate every
row before accessing its fields and return an InternalError asking the
user to retry when the response is incomplete.
### Release note
Fix a BE crash when scanning variables after receiving an incomplete FE
response; the query now returns an error asking the user to retry.
---
be/src/information_schema/schema_variables_scanner.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/be/src/information_schema/schema_variables_scanner.cpp
b/be/src/information_schema/schema_variables_scanner.cpp
index acc85bec816..57b515cab91 100644
--- a/be/src/information_schema/schema_variables_scanner.cpp
+++ b/be/src/information_schema/schema_variables_scanner.cpp
@@ -86,6 +86,15 @@ Status
SchemaVariablesScanner::get_next_block_internal(Block* block, bool* eos)
Status SchemaVariablesScanner::_fill_block_impl(Block* block) {
SCOPED_TIMER(_fill_block_timer);
+ constexpr int num_columns = 4;
+ for (const auto& row : _var_result.variables) {
+ if (row.size() < num_columns) {
+ return Status::InternalError(
+ "Incomplete variable entry from FE (expected {} fields,
got {}), "
+ "please retry",
+ num_columns, row.size());
+ }
+ }
auto row_num = _var_result.variables.size();
std::vector<void*> datas(row_num);
// variables names
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]