github-actions[bot] commented on code in PR #68018:
URL: https://github.com/apache/doris/pull/68018#discussion_r4032777651


##########
be/src/storage/segment/column_reader.h:
##########
@@ -1097,6 +1103,18 @@ class ConstantColumnReader : public ColumnReader {
 
     Status get_segment_zone_map(segment_v2::ZoneMap* zone_map) const override;
 
+    // This reader serves a value the caller supplied, so the on-disk index 
for the column describes
+    // something else: for a placeholder column it indexes the placeholder. 
Leaving the iterator
+    // unset makes the caller fall back to reading through this reader, the 
same as the path that
+    // finds no reader at all. The base implementation would also run on 
physical state this class
+    // never initializes.
+    Status new_index_iterator(const std::shared_ptr<IndexFileReader>& 
/*index_file_reader*/,
+                              const TabletIndex* /*index_meta*/, const 
std::string& /*rowset_id*/,
+                              uint32_t /*segment_id*/, size_t 
/*rows_of_segment*/,
+                              std::unique_ptr<IndexIterator>* /*iterator*/) 
override {
+        return Status::OK();
+    }
+

Review Comment:
   [P1] Preserve constant semantics across cache eviction. The constant reader 
is an ordinary LRU entry, so with capacity 1 and read order `[indexed c, 
indexed commit TSO]`, column setup leaves the constant cached, then `c`'s bare 
index lookup evicts it and the following TSO lookup rebuilds the physical 
reader. This override is never reached; placeholder index 0 can eliminate real 
TSO 42 for `tso > 20` while the retained row iterator yields 42. This is 
distinct from the existing races because it is single-threaded and the correct 
constant request already succeeded. Please derive the constant/no-index 
decision from `StorageReadOptions` (or retain non-evictable semantic state) and 
add a low-capacity end-to-end test.



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