[fix](move-memtable) only do close wait on the last sink (#30098)

This commit is contained in:
Kaijie Chen
2024-01-19 14:52:03 +08:00
committed by yiguolei
parent eb86872b70
commit afd440fea7

View File

@ -316,6 +316,10 @@ Status LoadStreamStub::close_wait(int64_t timeout_ms) {
if (_is_closed.load()) {
return _check_cancel();
}
// if there are other sinks remaining, let the last sink handle close wait
if (_use_cnt > 0) {
return Status::OK();
}
if (timeout_ms <= 0) {
timeout_ms = config::close_load_stream_timeout_ms;
}