xiangfu0 commented on code in PR #18584:
URL: https://github.com/apache/pinot/pull/18584#discussion_r3330194112


##########
pinot-common/src/main/java/org/apache/pinot/common/lineage/SegmentLineage.java:
##########
@@ -171,7 +176,11 @@ public ZNRecord toZNRecord() {
       String segmentsTo = String.join(COMMA_SEPARATOR, 
lineageEntry.getSegmentsTo());
       String state = lineageEntry.getState().toString();
       String timestamp = Long.toString(lineageEntry.getTimestamp());
-      List<String> listEntry = Arrays.asList(segmentsFrom, segmentsTo, state, 
timestamp);
+      // Omit the 5th element when the flag is the default (false): keeps the 
wire format
+      // identical to legacy 4-tuples for every entry that does not opt into 
observer-driven
+      // completion, so older readers continue to parse them.
+      List<String> listEntry = lineageEntry.isAutoCompleteLineageEntry() ? 
Arrays.asList(segmentsFrom, segmentsTo,

Review Comment:
   Writing a 5-tuple here breaks mixed-version controller compatibility. Older 
readers still expect exactly 4 list elements for a lineage entry, so the first 
`autoCompleteLineageEntry=true` write can make pre-upgrade controllers fail to 
parse the shared ZK record during rolling upgrade or rollback. Because this is 
controller-shared metadata, the new flag needs a wire-compatible encoding that 
old readers ignore, or a gated rollout plan.



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