[Improvement](writer) make DeltaWriter close idempotent to be more robust (#16558)

return `Status::OK()` instead of `Status::Error<ALREADY_CLOSED>()` for close() in `DeltaWriter` if it's already closed.
This commit is contained in:
Kang
2023-02-09 19:48:23 +08:00
committed by GitHub
parent a038fdaec6
commit 130b3599bc

View File

@ -293,7 +293,7 @@ Status DeltaWriter::close() {
if (_is_closed) {
LOG(WARNING) << "close after closed tablet_id=" << _req.tablet_id
<< " load_id=" << _req.load_id << " txn_id=" << _req.txn_id;
return Status::Error<ALREADY_CLOSED>();
return Status::OK();
}
auto s = _flush_memtable_async();