[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.
This commit is contained in:
Xin Liao
2022-12-19 14:22:25 +08:00
committed by GitHub
parent e8bac706d3
commit 03ea2866b7

View File

@ -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;
}