This is an automated email from the ASF dual-hosted git repository.

gavinchou 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 6fe0b1904bb [improvement](pk lookup) Avoid copying segment key bounds 
(#67618)
6fe0b1904bb is described below

commit 6fe0b1904bb408d0fcacfac7ee0a9e67d75f0f40
Author: foxtail463 <[email protected]>
AuthorDate: Wed Sep 9 11:40:54 2026 +0800

    [improvement](pk lookup) Avoid copying segment key bounds (#67618)
    
    Primary-key lookup copied each rowset’s segment key bounds into a
    temporary vector before pruning candidate segments. This caused repeated
    allocation and protobuf object copying on the lookup hot path, with
    overhead increasing alongside the number of segments.
    
    Co-authored-by: yangtao555 <[email protected]>
---
 be/src/storage/tablet/base_tablet.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/be/src/storage/tablet/base_tablet.cpp 
b/be/src/storage/tablet/base_tablet.cpp
index c4a487f80ce..2084b3abbb3 100644
--- a/be/src/storage/tablet/base_tablet.cpp
+++ b/be/src/storage/tablet/base_tablet.cpp
@@ -482,8 +482,7 @@ Status BaseTablet::lookup_row_key(const Slice& encoded_key, 
TabletSchema* latest
             delete_bitmap == nullptr ? _tablet_meta->delete_bitmap_ptr() : 
delete_bitmap;
     for (size_t i = 0; i < specified_rowsets.size(); i++) {
         const auto& rs = specified_rowsets[i];
-        std::vector<KeyBoundsPB> segments_key_bounds;
-        rs->rowset_meta()->get_segments_key_bounds(&segments_key_bounds);
+        const auto& segments_key_bounds = 
rs->rowset_meta()->get_segments_key_bounds();
         int num_segments = cast_set<int>(rs->num_segments());
         // MOW lookup requires per-segment bounds. Aggregation must be disabled
         // for MOW writers, but enforce at runtime too — indexing 
segments_key_bounds[j]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to