eldenmoon commented on PR #70408:
URL: https://github.com/apache/doris/pull/70408#issuecomment-7095372691

   Review summary — e1851612
   Two P1 issues remain and should be fixed before merging. The old doc 
property names are accepted again, but upgrade compatibility is still 
incomplete.
   1. [P1] Compaction can still lose fields after RESTORE.
      Restoring a V1/count=0 backup into an existing V2/count=0 table, then 
writing new sparse-only paths, can cause those fields to disappear during 
compaction. The current guard only protects a V2 target; it misses the 
V1-target case. 
[Code](https://github.com/apache/doris/blob/e18516129d6f018452d9254de1f0f427ececff3b/be/src/exec/common/variant_util.cpp#L1291-L1335)
   2. [P1] Historical SQL remains incompatible.
      variant_enable_typed_paths_to_sparse now rejects both true and false. 
Existing views and MVs containing this property can fail. Routine Load jobs 
containing it can become CANCELLED during FE restart. 
[Code](https://github.com/apache/doris/blob/e18516129d6f018452d9254de1f0f427ececff3b/fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java#L2109-L2163)
   3. [P2] Legacy doc-mode SQL can infer a different count after upgrade.
      The same doc-mode expression previously produced count=0 but now defaults 
to 2048. Existing asynchronous MVs can fail refresh with a type mismatch, and 
previously valid MODIFY COLUMN statements can fail. Restoring the property 
names only fixes parsing. 
[Code](https://github.com/apache/doris/blob/e18516129d6f018452d9254de1f0f427ececff3b/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVPlanUtil.java#L1232-L1243)
   4. [P2] The legacy sparse shard setting is silently ignored.
      variant_sparse_hash_shard_count is accepted but its value is discarded. 
Reusing the original parameters in MODIFY COLUMN can therefore fail the 
immutable shard-count check. It should remain a functional alias. 
[Code](https://github.com/apache/doris/blob/e18516129d6f018452d9254de1f0f427ececff3b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java#L5478-L5486)
   5. [P2] Compaction still applies the extraction threshold to input rows.
      Deduplication, filtering, or output splitting can leave output segments 
below the threshold while still extracting subcolumns. No data loss was 
established for this issue. 
[Code](https://github.com/apache/doris/blob/e18516129d6f018452d9254de1f0f427ececff3b/be/src/exec/common/variant_util.cpp#L1232-L1237)
   For normal in-place upgrades: existing V1/count=0 columns still extract all 
dynamic paths, including newly written keys. Existing doc-mode thresholds 
remain effective. 
[Code](https://github.com/apache/doris/blob/e18516129d6f018452d9254de1f0f427ececff3b/be/src/storage/segment/variant/v2/variant_path_builder.cpp#L1448-L1460)
   
   Validation: static code review only; no live upgrade or RESTORE/compaction 
reproduction was run.


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