eldenmoon opened a new pull request, #69434:
URL: https://github.com/apache/doris/pull/69434

   ### What problem does this PR solve?
   
   Problem Summary: During a mixed-version upgrade, a backend can receive a 
Variant V1 block while its type factory always creates Variant V2 columns. The 
layouts differ, so decoding the old payload as V2 can read invalid lengths and 
crash during an import or exchange.
   
   Validate the existing `variant_is_v2` metadata for every column, including 
ARRAY/MAP/STRUCT children, before decompressing or decoding any payload. Return 
an explicit unsupported-format error for V1 blocks. This does not change the 
wire layout or `be_exec_version`.
   
   This receiver-side check protects updated backends. It does not add 
sender-side capability negotiation or bounded payload decoding, and does not 
make an unpatched old receiver safe.
   
   ### Release note
   
   Return an explicit error for incompatible Variant V1 blocks received by a 
Variant V2 backend.
   
   ### Check List (For Author)
   
   - Test: ASAN focused `BlockVariantWireFormatTest.*:BlockTest.*`, **33/33 
passed** (5 added tests and 28 existing Block tests). The missing-rejection 
case fails before the fix. Repository clang-format 16, build hygiene and 
clang-tidy passed.
   - Validation limit: the full BE UT build fails in unchanged 
`function_string_test.cpp:2971-2987` on the base revision (`Field` string 
construction and removed `FunctionContext` constants). The focused run 
temporarily selected Block/test utility sources and the two existing shared 
test implementations needed for linking in local CMake; that selection was 
restored before committing. No mixed-version cluster run was performed.
   - Behavior changed: Yes; incompatible Variant V1 blocks fail before payload 
decoding.
   - Does this need documentation: No
   
   This PR targets master only. The 4.1 branch retains a V1 reader and needs 
its own guard for the older V1 layout without doc-value data; this condition 
should not be cherry-picked unchanged.
   


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