AHeise commented on code in PR #154:
URL:
https://github.com/apache/flink-connector-kafka/pull/154#discussion_r2014512228
##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/sink/KafkaWriterStateSerializer.java:
##########
@@ -47,8 +54,15 @@ public byte[] serialize(KafkaWriterState state) throws
IOException {
public KafkaWriterState deserialize(int version, byte[] serialized) throws
IOException {
try (final ByteArrayInputStream bais = new
ByteArrayInputStream(serialized);
final DataInputStream in = new DataInputStream(bais)) {
- final String transactionalIdPrefx = in.readUTF();
- return new KafkaWriterState(transactionalIdPrefx);
+ final String transactionalIdPrefix = in.readUTF();
+ final Collection<CheckpointTransaction> ongoingTransactions = new
ArrayList<>();
+ if (version >= 2) {
Review Comment:
I can do it. Both patterns exist. Using >= you could potentially downgrade
again if your state is forward compatible but that's rare.
--
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]