[
https://issues.apache.org/jira/browse/FLINK-7595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16155352#comment-16155352
]
ASF GitHub Bot commented on FLINK-7595:
---------------------------------------
GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/4651
[FLINK-7595] [Savepoints] Allow removing stateless operators
## What is the purpose of the change
This PR reverts a regression where stateless operators could no longer be
removed from a job when loading a savepoint without setting the
`--allowNonRestoredState` flag. The check now explicitly checks whether the
state of an operator, that could not be mapped to the new program, is empty.
## Brief change log
* Modify `SavepointLoader` to check whether the unmapped state is actually
empty
* Modify `AbstractOperatorRestoreTestBase` to allow subclasses to set the
`--allowNonRestoredState` flag
* Add a modified version of `ChainLengthDecreaseTest` to prevent this issue
from re-emerging.
## Verifying this change
This change added tests and can be verified as follows:
Run `ChainLengthStatelessDecreaseTest`. Alternatively, run the reproducer
from the JIRA before and after the change.
## 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: (yes)
## Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable)
This should be merged to 1.3 and master. Note that for 1.3 it may be
necessary to backport the `OperatorSubtaskState#hasState()` method.
@StefanRRichter @uce
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zentol/flink 7595
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/4651.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 #4651
----
commit 2a44118ddc3a79f9386fe05f3b1f9e6128e92e64
Author: zentol <[email protected]>
Date: 2017-09-06T13:38:20Z
[FLINK-7595] [Savepoints] Allow removing stateless operators
----
> Removing stateless task from task chain breaks savepoint restore
> ----------------------------------------------------------------
>
> Key: FLINK-7595
> URL: https://issues.apache.org/jira/browse/FLINK-7595
> Project: Flink
> Issue Type: Bug
> Components: State Backends, Checkpointing
> Reporter: Ufuk Celebi
> Assignee: Chesnay Schepler
> Attachments: ChainedTaskRemoveTest.java
>
>
> When removing a stateless operator from a 2-task chain where the head
> operator is stateful breaks savepoint restore with
> {code}
> Caused by: java.lang.IllegalStateException: Failed to rollback to savepoint
> /var/folders/py/s_1l8vln6f19ygc77m8c4zhr0000gn/T/junit1167397515334838028/junit8006766303945373008/savepoint-cb0bcf-3cfa67865ac0.
> Cannot map savepoint state...
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)