You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/12/11 16:51:07 UTC

[GitHub] [flink] rkhachatryan commented on pull request #21468: [FLINK-30345][state/changelog] Avoid using sync DataOutputViewStreamWrapper to serialize records to changelog

rkhachatryan commented on PR #21468:
URL: https://github.com/apache/flink/pull/21468#issuecomment-1345602914

   Thanks for the PR @masteryhx , I like the proposal.
   
   How about taking it one step further:
   1. Use `DataOutputView` instead of `DataOutputViewStreamWrapper` (`master`) / `DataOutputViewStream` (this pr currently)
   2. Use `DataOutputSerializer` instead of `ByteArrayOutputStream`+`DataOutputViewStreamWrapper`
   
   The only non-trivial issue I found is writing `ttlConfig` in `KvStateChangeLoggerImpl.writeDefaultValueAndTtl`. 
   This can be done for example into a temporary destination (something like `new ObjectOutputStream(new ByteArrayOutputStream())`).
   
   Advantages:
   - `DataOutputSerializer` should be more efficient
   - `DataOutputView` is more abstract so it implies less restricitions on changelog classes
   - `DataOutputViewStream` doesn't have to be modified
   
   WDYT?


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org