zhannngchen commented on code in PR #20706:
URL: https://github.com/apache/doris/pull/20706#discussion_r1229183664
##########
be/src/olap/tablet.cpp:
##########
@@ -2703,9 +2704,11 @@ Status Tablet::lookup_row_data(const Slice& encoded_key,
const RowLocation& row_
}
// ATTN: caller should hold the meta lock.
-Status Tablet::lookup_row_key(const Slice& encoded_key, bool with_seq_col,
- const RowsetIdUnorderedSet* rowset_ids,
RowLocation* row_location,
- uint32_t version, RowsetSharedPtr* rowset) {
+Status Tablet::lookup_row_key(
+ const Slice& encoded_key, bool with_seq_col, const
RowsetIdUnorderedSet* rowset_ids,
+ RowLocation* row_location, uint32_t version,
+ std::unordered_map<RowsetId, SegmentCacheHandle, HashOfRowsetId>&
segment_caches,
Review Comment:
emm... one more parameter, we need a refactor later
##########
be/src/service/point_query_executor.cpp:
##########
@@ -264,7 +265,7 @@ Status PointQueryExecutor::_lookup_row_key() {
// Get rowlocation and rowset, ctx._rowset_ptr will acquire wrap this
ptr
auto rowset_ptr = std::make_unique<RowsetSharedPtr>();
st = (_tablet->lookup_row_key(_row_read_ctxs[i]._primary_key, true,
nullptr, &location,
- INT32_MAX /*rethink?*/,
rowset_ptr.get()));
+ INT32_MAX /*rethink?*/, segment_caches,
rowset_ptr.get()));
Review Comment:
point lookup should not use such a segment cache? it's meaningless
you should allow to pass a nullptr here.
##########
be/src/olap/rowset/segment_v2/segment_writer.cpp:
##########
@@ -363,6 +365,7 @@ Status
SegmentWriter::append_block_with_partial_content(const vectorized::Block*
bool has_default = false;
std::vector<bool> use_default_flag;
use_default_flag.reserve(num_rows);
+ std::unordered_map<RowsetId, SegmentCacheHandle, HashOfRowsetId>
segment_caches;
Review Comment:
Add a comment here, why do we need such a cache
--
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]