You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by sihuazhou <gi...@git.apache.org> on 2018/05/11 15:37:41 UTC
[GitHub] flink pull request #5993: [FLINK-9336][state] fix deserialization problem fo...
GitHub user sihuazhou opened a pull request:
https://github.com/apache/flink/pull/5993
[FLINK-9336][state] fix deserialization problem for queryable MapState
## What is the purpose of the change
This PR fixes the deserialization problem for queryable MapState. Currently MapState use the `userKeyOffset` to skip the userKeyBytes when doing deserialization, for queryable state this will bring problem, this PR keeps the `userKeyOffset` in every `RocksDBMapEntry` to avoid the deserialization problem for queryable MapState.
## Brief change log
- *Keep the `userKeyOffset` in every `RocksDBMapEntry` to avoid deserialization problem in queryable state.*
## Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
## 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)`: (no)
- The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
- The S3 file system connector: (no)
## Documentation
- Does this pull request introduce a new feature? (no)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sihuazhou/flink FLINK-9336
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5993.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5993
----
commit 7b8443cd3d7f405bed97f00e1542a1004aef9ff8
Author: sihuazhou <su...@...>
Date: 2018-05-11T15:15:07Z
keep the userKeyOffset in every MapEntry to avoid deserialization problem in queryable state.
----
---
[GitHub] flink issue #5993: [FLINK-9336][state] fix deserialization problem for query...
Posted by kl0u <gi...@git.apache.org>.
Github user kl0u commented on the issue:
https://github.com/apache/flink/pull/5993
Thanks for the work @sihuazhou and for reporting this @florianschmidt1994 ! This fixes the problem described in the JIRA but I will look at the PR a bit more thoroughly on Monday at the latest and then merge it if everything is ok.
---
[GitHub] flink pull request #5993: [FLINK-9336][state] fix deserialization problem fo...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/5993
---
[GitHub] flink issue #5993: [FLINK-9336][state] fix deserialization problem for query...
Posted by sihuazhou <gi...@git.apache.org>.
Github user sihuazhou commented on the issue:
https://github.com/apache/flink/pull/5993
cc @StefanRRichter, @kl0u you may also care about this...
---
[GitHub] flink issue #5993: [FLINK-9336][state] fix deserialization problem for query...
Posted by sihuazhou <gi...@git.apache.org>.
Github user sihuazhou commented on the issue:
https://github.com/apache/flink/pull/5993
I made an additional fixup to `StateBackendTestBase#testMapState()` to guard this fix in the future, @kl0u please free feel to let me know if you want to revert it. I do this because this bug wasn't be discovered by the current tests. The reason is that the tests related to the `getSerializedValue()` (e.g `StateBackendTestBase#testMapState()`) used the `Integer` as the backend key type, which will has the same `userKeyOffset` for every entry, I change it to `String` so that it can trigger the exception for the old code and guard this fix in the future.
---