github-actions[bot] commented on code in PR #67180:
URL: https://github.com/apache/doris/pull/67180#discussion_r4089583375
##########
be/src/storage/segment/segment_iterator.cpp:
##########
@@ -820,6 +807,38 @@ Status
SegmentIterator::_get_row_ranges_by_column_conditions() {
return Status::OK();
}
+ // Apply stable scan restrictions before evaluating inverted-index
expressions so
+ // selective restrictions can also serve as phrase-query candidates. The
candidate
+ // pointer keeps referring to _row_bitmap as later predicates shrink it.
+ auto delete_bitmap_it = _opts.delete_bitmap.find(segment_id());
+ if (delete_bitmap_it != _opts.delete_bitmap.end() &&
delete_bitmap_it->second != nullptr) {
+ size_t pre_size = _row_bitmap.cardinality();
+ _row_bitmap -= *delete_bitmap_it->second;
Review Comment:
[P1] Do not publish condition-cache results whose proof depends on this
versioned delete bitmap. `BetaRowsetReader` aggregates it through the reader's
snapshot version, but `ConditionCache::CacheKey` contains only
rowset/segment/predicate digest. A newer snapshot can subtract more rows here
and then reach an empty-domain return or a later proved-empty index path while
the phrase digest remains live; EOF inserts an all-false entry that an
already-created older reader can reuse even though its delete bitmap still
exposes matching rows. Before this reorder, fully index-evaluable phrases
cleared the digest before delete subtraction. Please disable cache
lookup/publication whenever this unkeyed bitmap contributes (or key by
visibility), and cover the ordering where V1 constructs its iterator, V2
publishes, then V1 initializes.
--
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]