{"record":{"id":"8b3bac3e63f9a88d","repo":"databendlabs/databend","slug":"internal-error-expect-some-txngetresponseget-but","errorCode":null,"errorMessage":"internal error: expect some TxnGetResponseGet, but got {:?}","messagePattern":"internal error: expect some TxnGetResponseGet, but got (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/api/src/api_impl/table_api.rs","lineNumber":1594,"sourceCode":"                return Ok(Ok(UpdateTableMetaReply {}));\n            }\n            IdempotentKVTxnResponse::AlreadyCommitted => {\n                info!(\n                    \"Transaction ID {} exists, the corresponding update_multi_table_meta transaction has been executed successfully\",\n                    txn_sender.get_txn_id()\n                );\n                return Ok(Ok(UpdateTableMetaReply {}));\n            }\n            IdempotentKVTxnResponse::Failed(op_responses) => op_responses,\n        };\n\n        let mut mismatched_tbs = vec![];\n        for (resp, req) in else_branch_op_responses\n            .iter()\n            .zip(update_table_metas.iter())\n        {\n            let Some(Response::Get(get_resp)) = &resp.response else {\n                unreachable!(\n                    \"internal error: expect some TxnGetResponseGet, but got {:?}\",\n                    resp.response\n                )\n            };\n            // deserialize table version info\n            let (tb_meta_seq, table_meta): (_, TableMeta) = if let Some(seq_v) = &get_resp.value {\n                (seq_v.seq, deserialize_struct(&seq_v.data)?)\n            } else {\n                return Err(KVAppError::AppError(AppError::UnknownTableId(\n                    UnknownTableId::new(req.0.table_id, \"update_multi_table_meta\"),\n                )));\n            };\n\n            // check table version\n            if req.0.seq.match_seq(&tb_meta_seq).is_err() {\n                mismatched_tbs.push((req.0.table_id, tb_meta_seq, table_meta));\n            }\n        }","sourceCodeStart":1576,"sourceCodeEnd":1612,"githubUrl":"https://github.com/databendlabs/databend/blob/288d84d76e20a2f8f7173bda9691eb6ece301aa9/src/meta/api/src/api_impl/table_api.rs#L1576-L1612","documentation":"update_multi_table_meta_with_sender performs a transaction that fetches current table meta for each table being updated (to compare versions) and asserts every response is a Get response. If any response in else_branch_op_responses is not Response::Get, this unreachable!() panics with the actual variant. This indicates the meta txn layer replied with an unexpected response type to a plain read — an internal invariant violation, since version-conflict paths are supposed to surface as a failed txn predicate instead.","triggerScenarios":"Calling update_multi_table_meta (e.g. during table option/cluster-key updates) where the txn else-branch responses include a non-Get response for one of the requested table ids — usually caused by mixed meta versions or a protocol-level bug.","commonSituations":"Concurrent DDL on the same table hitting the version-check path while a meta node returns a malformed response; clusters with inconsistent meta-node versions after a rolling upgrade.","solutions":["Confirm all meta nodes are on the same version; upgrade/roll back to a consistent release","Retry update_multi_table_meta — if it panics repeatedly for one table id, inspect that table's meta entries in the store","Gather the panic log (it prints the unexpected response variant) and file a meta-service bug","Reduce concurrent DDL on the same tables until the root cause is fixed"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":"fn as_get(resp: &Response) -> Option<&GetResponse> { if let Response::Get(g) = resp { Some(g) } else { None } }","tryCatchPattern":"match &resp.response { Response::Get(g) => g, other => { log::error!(\"unexpected: {:?}\", other); return retry(); } }","preventionTips":["Reduce concurrent DDL on the same tables","Align meta node versions across the cluster","Capture panic logs with the response variant for bug reports"],"tags":["rust","meta-service","transaction","internal-invariant"],"backgroundTag":"unexpected-response-shape","analyzedSha":"288d84d76e20a2f8f7173bda9691eb6ece301aa9","analyzedAt":"2026-09-11T11:29:36.208Z","contentChangedAt":"2026-09-11T11:29:36.208Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}