Skip to content

Commit 152eff1

Browse files
dataroaringclaude
andcommitted
[opt](segment) Address review comments
- Add rowset_id to LazyInitSegmentIterator skip log for better debuggability - Remove unused #include "common/config.h" from lazy_init_segment_iterator.h - Use specific DebugPoints::remove() instead of clear() in test TearDown - Assert json2pb::JsonToProtoMessage return value in test Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c3371a0 commit 152eff1

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

be/src/storage/segment/lazy_init_segment_iterator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ Status LazyInitSegmentIterator::init(const StorageReadOptions& opts) {
4343
auto st = SegmentLoader::instance()->load_segment(
4444
_rowset, _segment_id, &segment_cache_handle, _should_use_cache, false, opts.stats);
4545
if (st.is<ErrorCode::NOT_FOUND>() && config::ignore_not_found_segment) {
46-
LOG(WARNING) << "segment not found, skip it. seg_id=" << _segment_id;
46+
LOG(WARNING) << "segment not found, skip it. rowset_id=" << _rowset->rowset_id()
47+
<< ", seg_id=" << _segment_id;
4748
// _inner_iterator remains nullptr, next_batch() will return EOF
4849
return Status::OK();
4950
}

be/src/storage/segment/lazy_init_segment_iterator.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#pragma once
1919

20-
#include "common/config.h"
2120
#include "core/block/block.h"
2221
#include "storage/segment/common.h"
2322
#include "storage/segment/segment.h"

be/test/storage/segment/ignore_not_found_segment_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class IgnoreNotFoundSegmentTest : public testing::Test {
4444
}
4545

4646
void TearDown() override {
47-
DebugPoints::instance()->clear();
47+
DebugPoints::instance()->remove("BetaRowset::load_segment.return_not_found");
4848
config::ignore_not_found_segment = _saved_ignore;
4949
config::enable_debug_points = _saved_debug_points;
5050

@@ -76,7 +76,7 @@ class IgnoreNotFoundSegmentTest : public testing::Test {
7676
"empty": false
7777
})";
7878
RowsetMetaPB pb;
79-
json2pb::JsonToProtoMessage(json, &pb);
79+
EXPECT_TRUE(json2pb::JsonToProtoMessage(json, &pb));
8080
pb.set_start_version(0);
8181
pb.set_end_version(1);
8282
pb.set_num_segments(num_segments);

0 commit comments

Comments
 (0)