[
https://issues.apache.org/jira/browse/FLINK-8505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16337997#comment-16337997
]
ASF GitHub Bot commented on FLINK-8505:
---------------------------------------
GitHub user tillrohrmann opened a pull request:
https://github.com/apache/flink/pull/5354
[FLINK-8505] [flip6] Prevent SlotManager from reaching an inconsistent state
## What is the purpose of the change
The SlotManager could reach an inconsistent state when a formerly free slot
is reported
to be allocated by an incoming SlotReport. This state transition did not
remove the slot
from the set of free slots. As a consequence, a now allocated slot will be
considered for
future SlotRequests. This caused a failure with an IllegalStateException.
The problem is solved by removing an updated slot which is now allocated
from the set of
free slots.
## Brief change log
- Remove slot from `SlotManager#freeSlots` when slot is reported to be
`ALLOCATED` instead of `FREE`
## Verifying this change
- Added `SlotManagerTest#testReportAllocatedSlot`
## 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)
- The S3 file system connector: (no)
## Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tillrohrmann/flink fixSlotManagerInconsistency
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5354.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 #5354
----
commit 329bbb0e3bf7600054e865acf69c63187d04b4a0
Author: Till Rohrmann <trohrmann@...>
Date: 2018-01-24T17:32:47Z
[FLINK-8505] [flip6] Prevent SlotManager from reaching an inconsistent state
The SlotManager could reach an inconsistent state when a formerly free slot
is reported
to be allocated by an incoming SlotReport. This state transition did not
remove the slot
from the set of free slots. As a consequence, a now allocated slot will be
considered for
future SlotRequests. This caused a failure with an IllegalStateException.
The problem is solved by removing an updated slot which is now allocated
from the set of
free slots.
----
> SlotManager can reach inconsistent state
> ----------------------------------------
>
> Key: FLINK-8505
> URL: https://issues.apache.org/jira/browse/FLINK-8505
> Project: Flink
> Issue Type: Bug
> Components: Distributed Coordination
> Affects Versions: 1.5.0
> Reporter: Till Rohrmann
> Assignee: Till Rohrmann
> Priority: Major
> Labels: flip-6
> Fix For: 1.5.0
>
>
> The {{SlotManager}} can reach an inconsistent state when a formerly free task
> slot is reported as allocated by an incoming {{SlotReport}}. The problem is
> that the slot won't be removed from the set of free slots and, thus, will be
> considered for future slot requests.
> The solution is to remove the slot from the set of free slots once it is
> reported allocated.
>
> https://travis-ci.org/tillrohrmann/flink/jobs/332871241
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)