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


##########
be/src/storage/index/index_file_reader.cpp:
##########
@@ -497,6 +499,19 @@ Result<std::unique_ptr<DorisCompoundReader, 
DirectoryDeleter>> IndexFileReader::
     return _open(index_id, index_suffix, io_ctx);
 }
 
+Result<std::unique_ptr<AnnIndexSource>> IndexFileReader::open_ann_source(
+        const TabletIndex* index_meta, const io::IOContext* io_ctx) const {
+    // Every format serves an ANN index through the compound reader of its 
files:
+    // V1 its per-index file, V2 its entry table over the one index file, and 
SNII
+    // (until it serves ANN natively) the blob's extents in the container.
+    auto compound_reader = open(index_meta, io_ctx);

Review Comment:
   [P1] Preserve ANN fallback when opening a V2/SNII compound reader fails. 
`open_ann_source()` calls `open()` here, but `_open()` only catches 
`CLuceneError` in the V1 branch; V2/SNII construct `DorisCompoundReader` 
directly, and its constructor rethrows read/parse failures. The old 
`AnnIndexReader::load_index()` catch converted these errors to a `Status`, 
while the new `try_load_index()` has no catch, so a truncated/corrupt or 
remote-read-failed directory throws out of the iterator instead of returning 
`false` for brute-force fallback. Restore the catch around this forwarding path 
(or catch in every `_open()` branch) and preserve the existing fallback 
behavior.



##########
build-support/check-header-deps.py:
##########
@@ -644,16 +644,11 @@
 # the gate, so the tables only shrink.
 # Files that include a CLucene header and are under a root or reached from one.
 CLUCENE_INCLUDING_FILES = {
-    # ANN storage (T11, T12).

Review Comment:
   [P2] Add regression coverage for the ANN CLucene-free gate change. This PR 
removes the ANN paths from `CLUCENE_INCLUDING_FILES` and 
`CLUCENE_SYMBOL_FILES`, but 
`build-support/tests/test-build-hygiene-header-deps.sh` has no ANN red/green 
injection that proves those entries stay removed. The repository gate 
instructions require every `check-*` behavior change to update its self-test; 
add the ANN case and run the aggregate self-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