This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new d474e037156 [fix](move-memtable) check segment id in add_segment (#29898) d474e037156 is described below commit d474e037156c3e4d5ff91d80ccf269051b0aa023 Author: Kaijie Chen <c...@apache.org> AuthorDate: Fri Jan 12 14:13:33 2024 +0800 [fix](move-memtable) check segment id in add_segment (#29898) --- be/src/runtime/load_stream.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/be/src/runtime/load_stream.cpp b/be/src/runtime/load_stream.cpp index a7b0f6ca8a4..efffa23e650 100644 --- a/be/src/runtime/load_stream.cpp +++ b/be/src/runtime/load_stream.cpp @@ -189,9 +189,15 @@ Status TabletStream::add_segment(const PStreamHeader& header, butil::IOBuf* data { std::lock_guard lock_guard(_lock); if (!_segids_mapping.contains(src_id)) { - LOG(WARNING) << "No segid mapping for src_id " << src_id - << " when ADD_SEGMENT, ignored"; - return Status::OK(); + return Status::InternalError( + "add segment failed, no segment written by this src be yet, src_id={}, " + "segment_id={}", + src_id, segid); + } + if (segid >= _segids_mapping[src_id]->size()) { + return Status::InternalError( + "add segment failed, segment is never written, src_id={}, segment_id={}", + src_id, segid); } new_segid = _segids_mapping[src_id]->at(segid); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org