From 65f94b4b500c9f1aa9c962b0647b8d3f2a35dc41 Mon Sep 17 00:00:00 2001 From: nextdreamblue Date: Fri, 3 Mar 2023 23:25:09 +0800 Subject: [PATCH] [fix](publish) fix when TabletPublishTxnTask::handle() error, transaction publish success, and query table error be use EnginePublishVersionTask to publish all replica of all tablets of table of one transaction, and EnginePublishVersionTask use TabletPublishTxnTask to truly publish tablet and make rowset visible. but if TabletPublishTxnTask error, tablet id will add _error_tablet_ids but no return some errors, and EnginePublishVersionTask will not report any error to fe, and fe make this transaction visible, and partition's version add 1. but if you query this table, will return error like "MySQL [test]> select * from test12;ERROR 1105 (HY000): errCode = 2, detailMessage = [INTERNAL_ERROR]failed to initialize storage reader. tablet=14023.730105214.d742d664692db946-386daa993d84d89d, res=[INTERNAL_ERROR][9.134.167.25]fail to find path in version_graph. spec_version: 0-3, backend=9.134.167.25". after this pr, _error_tablet_ids will report to fe, this transaction will not be visible and add ErrMsg like "publish on tablet 14038 failed.". Signed-off-by: nextdreamblue --- be/src/agent/task_worker_pool.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/be/src/agent/task_worker_pool.cpp b/be/src/agent/task_worker_pool.cpp index 4056e0d1768f69..f1f61fdb660d4a 100644 --- a/be/src/agent/task_worker_pool.cpp +++ b/be/src/agent/task_worker_pool.cpp @@ -882,6 +882,7 @@ void TaskWorkerPool::_publish_version_worker_thread_callback() { finish_task_request.__set_task_type(agent_task_req.task_type); finish_task_request.__set_signature(agent_task_req.signature); finish_task_request.__set_report_version(_s_report_version); + finish_task_request.__set_error_tablet_ids(error_tablet_ids); _finish_task(finish_task_request); _remove_task_info(agent_task_req.task_type, agent_task_req.signature);