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


##########
be/src/storage/index/inverted/snii/writer/logical_index_writer.cpp:
##########
@@ -936,9 +936,10 @@ Status LogicalIndexWriter::prepare_build(io::FileWriter* 
posting_out) {
 
 Status LogicalIndexWriter::build_norms_section() {
     // Sparse norms drop the bytes of the NULL rows, and store a norm that 
every row shares once.
-    // Writers keep dense norms; this debug point lets tests choose between 
the two forms.
-    bool consider_sparse = false;
-    DBUG_EXECUTE_IF("LogicalIndexWriter::finalize_build.sparse_norms", { 
consider_sparse = true; });
+    // This debug point keeps dense norms, for tests that compare the two 
forms.
+    bool consider_sparse = true;

Review Comment:
   [P1] Preserve sparse norms across rewrites by older BEs. When `null_docids_` 
and `term_hashes_` are both empty, an analyzed segment whose rows share one 
norm now selects `sparse_norms`; the norms section is then the last physical 
section. A pre-#70883 BE ignores field 6, so its rewrite prefix calculation 
copies only dict/posting/dense norms/null bitmap/BSBF, but its tail still 
re-emits the core metadata reference to the sparse section. The rewritten 
container therefore points at omitted or metadata bytes and a newer BE cannot 
load or score it. Keep this no-NULL/no-term case dense, or otherwise make that 
section part of the inherited prefix until all supported readers preserve field 
6.



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