yiguolei commented on code in PR #67720:
URL: https://github.com/apache/doris/pull/67720#discussion_r4450403960
##########
be/src/storage/segment/segment.cpp:
##########
@@ -1379,6 +1359,10 @@ Status
Segment::_get_segment_footer(std::shared_ptr<SegmentFooterPB>& footer_pb,
// as other index/metadata pages and avoids competing with DATA_PAGE
budget.
if (!segment_footer_cache->lookup(cache_key, &cache_handle,
segment_v2::PageTypePB::INDEX_PAGE)) {
+ VLOG_DEBUG << fmt::format("Segment footer of {}:{}:{} is missing, try
to load it",
+ _file_reader->path().native(),
_file_reader->size(),
+ _file_reader->size() - 12);
+ std::shared_ptr<SegmentFooterPB> footer_pb_shared;
RETURN_IF_ERROR(_parse_footer(footer_pb_shared, stats, source_io_ctx));
Review Comment:
_footer_pb if this member is deleted, then I think you should modify
_parse_footer method to const method. Since there are many threads may call
parse footer concurrently and parse footer should not modify Segment's member.
And you should add comment to parse footer method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]