[
https://issues.apache.org/jira/browse/BEAM-8157?focusedWorklogId=307329&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-307329
]
ASF GitHub Bot logged work on BEAM-8157:
----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Sep/19 16:59
Start Date: 05/Sep/19 16:59
Worklog Time Spent: 10m
Work Description: mxm commented on pull request #9484: [BEAM-8157] Remove
length prefix from state key for Flink's state backend
URL: https://github.com/apache/beam/pull/9484#discussion_r321376090
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/ExecutableStageDoFnOperator.java
##########
@@ -343,11 +343,11 @@ public void clear(K key, W window) {
}
private void prepareStateBackend(K key) {
- // Key for state request is shipped already encoded as ByteString,
- // this is mostly a wrapping with ByteBuffer. We still follow the
- // usual key encoding procedure.
- // final ByteBuffer encodedKey = FlinkKeyUtils.encodeKey(key,
keyCoder);
- final ByteBuffer encodedKey = ByteBuffer.wrap(key.toByteArray());
+ // Key for state request is shipped already encoded as ByteString,
but it is
Review comment:
Yes, but that is incorrect. It worked before because we were applying a
double nested encoding.
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 307329)
Time Spent: 1h 10m (was: 1h)
> Flink state requests return wrong state when encoded key is length-prefixed
> ---------------------------------------------------------------------------
>
> Key: BEAM-8157
> URL: https://issues.apache.org/jira/browse/BEAM-8157
> Project: Beam
> Issue Type: Bug
> Components: runner-flink
> Affects Versions: 2.13.0
> Reporter: Maximilian Michels
> Assignee: Maximilian Michels
> Priority: Major
> Fix For: 2.16.0
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Due to multiple changes made in BEAM-7126, the Flink internal key encoding is
> broken when the key is encoded with a length prefix. The Flink runner
> requires the internal key to be encoded without a length prefix.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)