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


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

Review Comment:
   [P2] Document the EOF publication boundary. The pinned lance-c statistics 
callback fires only when the stream reaches successful EOF; its `FinallyStream` 
does not publish on drop or `Some(Err)`. Doris closes or returns without 
another poll on cancellation, `abort_split`, and scanner/conversion errors, so 
an interrupted or failed prefilter normally leaves all seven profile counters 
at zero even after doing work. This sentence instead implies that such a load 
may publish partial input counts. Please state that partial counts are 
observable only when an execution summary is published at EOF, and that non-EOF 
exits can leave the entire metric set unavailable.



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