beliefer opened a new pull request, #26686:
URL: https://github.com/apache/flink/pull/26686

   ## What is the purpose of the change
   
   This PR aims to add `getSerializedSizeInBytes` into 
`AsyncSinkWriterStateSerializer`.
   `AsyncSinkWriter` provides `getSizeInBytes` to get the size of request 
entry. Sometimes, get the accurate size has a lot of overhead. So the 
implementation of connector should estimate the size. But only estimate the 
size of request entry will lead to error while deserializing the state.
   The reason is the estimated value is filled into the `RequestEntryWrapper` 
and the value in `RequestEntryWrapper` will be serialized. While deserialize 
the state, connector read the estimated value and use it to deserialize 
remaining part. This will lead to unexpected result.
   
   
   ## Brief change log
   
   `AsyncSinkWriterStateSerializer` should consider the estimated size of 
request entry.
   
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
   Added test cases into AsyncSinkWriterStateSerializerTest.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (yes)
     - The serializers: (yes)
     - The runtime per-record code paths (performance sensitive): (yes)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes)
     - If yes, how is the feature documented? (JavaDocs)
   


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