tzulitai commented on a change in pull request #8570: [FLINK-12688] [state] 
Make serializer lazy initialization thread safe in StateDescriptor
URL: https://github.com/apache/flink/pull/8570#discussion_r289262391
 
 

 ##########
 File path: 
flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java
 ##########
 @@ -376,6 +387,9 @@ private void readObject(final ObjectInputStream in) throws 
IOException, ClassNot
 
                        in.readFully(buffer);
 
+                       TypeSerializer<T> serializer = 
serializerAtomicReference.get();
+                       checkNotNull(serializer, "Serializer not yet 
initialized.");
 
 Review comment:
   Same here: move this to the beginning of the if-branch.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to