[
https://issues.apache.org/jira/browse/FLINK-23598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17392169#comment-17392169
]
Stephan Ewen commented on FLINK-23598:
--------------------------------------
You are right, this looks wrong. Do you want to create a fix for this (with
test)?
The {{writeBytes(String)}} method is fortunately never used in Flink, because
it is strange (does not encode length) and also does not have a corresponding
read method.
> DataOutputSerializer.writeBytes updates position twice
> ------------------------------------------------------
>
> Key: FLINK-23598
> URL: https://issues.apache.org/jira/browse/FLINK-23598
> Project: Flink
> Issue Type: Bug
> Components: API / Core
> Affects Versions: 1.13.0
> Reporter: nihileon
> Priority: Critical
> Attachments: image-2021-08-03-16-07-17-790.png,
> image-2021-08-03-16-07-40-338.png, image-2021-08-03-16-08-09-249.png
>
> Original Estimate: 10m
> Remaining Estimate: 10m
>
> DataOutputSerializer.writeBytes updates this.position twice, which only need
> to be update once.
> If the initiate position is 0 and I write a string of length 10, the position
> will be updated to 20.
> !image-2021-08-03-16-07-17-790.png|width=762,height=372!!image-2021-08-03-16-07-40-338.png|width=744,height=166!
> !image-2021-08-03-16-08-09-249.png|width=698,height=269!
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)