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


##########
docs/lance-prefilter-profile.md:
##########
@@ -0,0 +1,58 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Lance vector row-ID prefilter profiling
+
+An explicit fragment list that covers every fragment in a fixed dataset 
snapshot does
+not restrict an unfiltered vector query. Lance can omit the row-ID prefilter 
scan in
+this case. The fragment selection remains attached to the scanner: indexed 
segment
+selection, unindexed-fragment fallback, snapshot visibility, deletion masks 
and overlay
+handling keep their existing semantics. A strict fragment subset or an actual 
filter
+continues to use the normal prefilter path.
+
+The following Doris counters describe Lance's ANN **row-ID prefilter loader**, 
not

Review Comment:
   [P2] Include FTS in the documented metric scope. The second pin advances to 
f202fe41, whose filtered FTS execution nodes use the same 
`FilteredRowIdsToPrefilter` metrics, and Doris maps those names without 
checking `_search_kind`. A successfully exhausted MATCH/PHRASE scan can 
therefore increment these counters even though this paragraph attributes them 
to ANN, which can mislead profile diagnosis. Please describe them as shared 
ANN/FTS row-ID loader metrics and update the adjacent C++ `ANN row-id loader` 
comment (or export distinct names by search kind).



##########
docs/lance-prefilter-profile.md:
##########
@@ -0,0 +1,58 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Lance vector row-ID prefilter profiling
+
+An explicit fragment list that covers every fragment in a fixed dataset 
snapshot does
+not restrict an unfiltered vector query. Lance can omit the row-ID prefilter 
scan in
+this case. The fragment selection remains attached to the scanner: indexed 
segment
+selection, unindexed-fragment fallback, snapshot visibility, deletion masks 
and overlay
+handling keep their existing semantics. A strict fragment subset or an actual 
filter
+continues to use the normal prefilter path.
+
+The following Doris counters describe Lance's ANN **row-ID prefilter loader**, 
not
+returned TopK rows, HNSW comparisons, or the deletion mask. Scalar-index 
selection
+vectors use a different loader and are not included in these counters.
+
+| Counter | Meaning |
+| --- | --- |
+| `LancePrefilterLoads` | Number of row-ID prefilter loader executions 
started. |
+| `LancePrefilterInputBatches` | Successfully consumed input batches. |
+| `LancePrefilterInputRows` | Non-null input row IDs, including duplicates. |
+| `LancePrefilterRowIds` | Sum of distinct row IDs in successfully completed 
allow sets. |
+| `LancePrefilterLoadTime` | Total loader wall time, including input polling 
and set construction. |
+| `LancePrefilterInputTime` | Wall time polling input batches, including 
upstream execution, I/O, decoding and scheduling. |
+| `LancePrefilterBuildTime` | Wall time inserting row IDs into the allow set, 
measured once per batch. |
+
+The timers overlap: do not add LoadTime to InputTime or BuildTime. They are 
not CPU
+timers. Across multiple loaders or scanners they accumulate and can exceed 
query
+wall time. RowIds is not peak resident memory and can count the same ID again 
when
+separate loaders build separate sets. An interrupted or failed load may 
contribute
+partial input counts without a completed set cardinality.
+
+For a full-snapshot, unfiltered ANN query, no row-ID loader is needed and these

Review Comment:
   [P2] Scope this zero-counter claim to a single all-fragment scanner. The f75 
optimization compares each scanner's fragment set with the opened manifest, but 
Doris plans one split per physical vector-index segment plus strict-subset 
uncovered-fragment splits. A full-snapshot unfiltered query over multiple 
segments therefore creates subset scanners that still build `FilteredRowIds`, 
and their successful callbacks can make these profile counters positive. Please 
say zero is expected only when a scanner/split itself contains the whole 
manifest, and note that segment-sharded full-snapshot queries may legitimately 
be nonzero.



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