rkhachatryan opened a new pull request #13351:
URL: https://github.com/apache/flink/pull/13351
## What is the purpose of the change
This is a *draft* PR to implement sequential reading of channel state.
There are still some unknowns:
- whether we want sequential read (as it might complicate rescaling)
- failing `StreamTaskSelectiveReadingITCase` (below)
The last change (unconditional reading of state, see changelog below)
currently fails `StreamTaskSelectiveReadingITCase`.
The problem also affects production so should be fixed externally; consider
the following case:
- Two IntputGates
- Input selection is not ALL (say FIRST initially)
- Unaligned Checkpoints ON
- on recovery, there are "parts" of records in all channels (actually 1 is
enough I think)
What happens:
1. StreamTask initiates recovery and scedule partition request upon it's end
2. All gates and channels will receive buffers from StateReader
3. All channels of a single gate will consume those state buffers -
completing that gate's StateConsumedFuture
4. InputProcessor will return NOTHING_AVAILABLE (see
StreamTwoInputProcessor.getInputStatus)
5. StreamTask will suspend its default action
6. State of the 2nd gate won't be consumed - so its StateConsumedFutures
won't be completed - so no partitions will be requested
Solution: request partitions independently for each channel.
## Brief change log
1. Implement sequntial reading - without dropping any existing code (to ease
review)
1. Remove old tests, methods in network-classes and eventually old reader
1. Explicitly check state in Recovered channels to disallow premature
conversion - to reduce needed test coverage
1. Unconditionally read channel state in `StreamTask` - to reduce needed
test coverage
## Verifying this change
- Added `SequentialChannelStateReaderImplTest` and
`ChannelStateChunkReaderTest` for the new code.
- Added `RecoveredInputChannelTest` to check that conversion is not
permitted untill fully recovered and state consumed
- State in `StreamTask` is read unconditionally, so some tests are eliminated
## 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)`: (yes / no)
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/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? no
----------------------------------------------------------------
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]