wollowizard commented on code in PR #34873:
URL: https://github.com/apache/beam/pull/34873#discussion_r2077483390
##########
sdks/java/extensions/avro/src/main/java/org/apache/beam/sdk/extensions/avro/coders/AvroCoder.java:
##########
@@ -840,4 +843,38 @@ public boolean equals(@Nullable Object other) {
public int hashCode() {
return Objects.hash(getClass(), typeDescriptor, datumFactory,
schemaSupplier.get());
}
+
+ private void readObject(ObjectInputStream in) throws IOException,
ClassNotFoundException {
Review Comment:
@scwhittle you wer right when deserializing the same coder, we would get
different readers/writers.
I've fixed that in a way similar to the one you described, but maybe a bit
simpler. I've added a test for that too.
As curiosity, are coders serialized and deserialized often? my assumption
was that they this happens when a new vm is started for example, or when
checkpointing. or does it happen even more often so to have a performance
impact?
--
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]