From 03ea2866b7998e21ebf3e7ebc320d4ae36d0ef24 Mon Sep 17 00:00:00 2001 From: Xin Liao Date: Mon, 19 Dec 2022 14:22:25 +0800 Subject: [PATCH] [fix](load) add to error tablets when delta writer failed to close (#15118) The result of load should be failed when all tablets delta writer failed to close on single node. But the result returned to client is success. The reason is that the committed tablets and error tablets are both empty, so publish will be success. We should add it to error tablets when delta writer failed to close, then the transaction will be failed. --- be/src/runtime/tablets_channel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/be/src/runtime/tablets_channel.cpp b/be/src/runtime/tablets_channel.cpp index 8096bd1ba8..6fdc42f2c4 100644 --- a/be/src/runtime/tablets_channel.cpp +++ b/be/src/runtime/tablets_channel.cpp @@ -118,6 +118,9 @@ Status TabletsChannel::close( if (!st.ok()) { LOG(WARNING) << "close tablet writer failed, tablet_id=" << it.first << ", transaction_id=" << _txn_id << ", err=" << st; + PTabletError* tablet_error = tablet_errors->Add(); + tablet_error->set_tablet_id(it.first); + tablet_error->set_msg(st.to_string()); // just skip this tablet(writer) and continue to close others continue; }