zyp-V commented on code in PR #67649:
URL: https://github.com/apache/doris/pull/67649#discussion_r3957004588


##########
be/src/storage/tablet/base_tablet.cpp:
##########
@@ -422,6 +429,26 @@ Status BaseTablet::lookup_row_data(const Slice& 
encoded_key, const RowLocation&
                                    RowsetSharedPtr input_rowset, 
OlapReaderStatistics& stats,
                                    std::string& values, bool write_to_cache,
                                    const io::IOContext* io_ctx) {
+    return _lookup_row_data(encoded_key, row_location, nullptr, 
std::move(input_rowset), stats,
+                            values, write_to_cache, io_ctx);
+}
+
+Status BaseTablet::lookup_row_data(const Slice& encoded_key, const 
RowLocation& row_location,
+                                   const segment_v2::SegmentSharedPtr& segment,
+                                   RowsetSharedPtr input_rowset, 
OlapReaderStatistics& stats,
+                                   std::string& values, bool write_to_cache,
+                                   const io::IOContext* io_ctx) {
+    DCHECK(segment != nullptr);
+    DCHECK_EQ(segment->id(), row_location.segment_id);
+    return _lookup_row_data(encoded_key, row_location, &segment, 
std::move(input_rowset), stats,

Review Comment:
   Within a single point query, the segment is healthy during key lookup but 
becomes unhealthy before row-data lookup. The previous implementation called 
load_segments again before reading the row data, so it could detect that 
failure. However, the segment could also become unhealthy after that second 
load_segments call. Given this low-probability scenario, I don’t think it is 
worth sacrificing hot-key query performance to handle it.



-- 
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]

Reply via email to