Skip to content

Commit

Permalink
log stream id
Browse files Browse the repository at this point in the history
  • Loading branch information
kaijchen committed Jan 9, 2024
1 parent 95255ac commit 73887b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions be/src/runtime/load_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ void LoadStream::_dispatch(StreamId id, const PStreamHeader& hdr, butil::IOBuf*
std::vector<PTabletID> tablets_to_commit(hdr.tablets().begin(), hdr.tablets().end());
auto st = close(hdr.src_id(), tablets_to_commit, &success_tablet_ids, &failed_tablet_ids);
_report_result(id, st, success_tablet_ids, failed_tablet_ids);
LOG(INFO) << "closing stream " << *this;
brpc::StreamClose(id);
} break;
case PStreamHeader::GET_SCHEMA: {
Expand All @@ -580,14 +581,15 @@ void LoadStream::on_closed(StreamId id) {
std::stringstream self;
self << "stream " << *this;
auto remaining_streams = _total_streams - _close_rpc_cnt.fetch_add(1) - 1;
LOG(INFO) << "stream " << id << " on_closed, remaining streams = " << remaining_streams;
LOG(INFO) << "stream " << *this << " on_closed, remaining streams = " << remaining_streams;
if (remaining_streams == 0) {
_load_stream_mgr->clear_load(_load_id);
}
}

inline std::ostream& operator<<(std::ostream& ostr, const LoadStream& load_stream) {
ostr << "load_id=" << UniqueId(load_stream._load_id) << ", txn_id=" << load_stream._txn_id;
ostr << "load_id=" << UniqueId(load_stream._load_id) << ", txn_id=" << load_stream._txn_id
<< ", remote stream_id=" << _remote_stream_id;
return ostr;
}

Expand Down

0 comments on commit 73887b2

Please sign in to comment.