poorbarcode commented on code in PR #132:
URL: 
https://github.com/apache/flink-connector-pulsar/pull/132#discussion_r4451210902


##########
flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/sink/committer/PulsarCommittableSerializer.java:
##########
@@ -112,7 +122,7 @@ public PulsarCommittable deserialize(int version, byte[] 
serialized) throws IOEx
             if (in.available() != 0) {
                 throw new IOException("Trailing bytes in Pulsar committable 
state");
             }
-            return new PulsarCommittable(txnID, messages);
+            return new PulsarCommittable(txnID, messages, version);

Review Comment:
   Fixed in 69c4fa4. Restored V1 committables now use a dedicated 
`restored_from_v1` placeholder in the existing V2 topic slot. Deserialization 
restores their in-memory version to 1, so repeated snapshot/restore cycles keep 
the legacy commit path instead of treating them as empty V2 transactions. This 
marker is only accepted with zero message IDs.
   
   Added regressions starting from actual V1 bytes, covering repeated 
restore/reserialize cycles and commit failure/retry handling. All 39 
serializer/committer tests and the full-repository Spotless check pass.
   
   The serializer version remains 2 and the field layout is unchanged. This 
extends the accepted placeholder values: V2 readers that strictly accept only 
the original placeholder will reject state carrying the new marker.



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

Reply via email to