Github user NicoK commented on the issue:
https://github.com/apache/flink/pull/4485
Hi @zhijiangW,
regarding the buffer pool implementation, I was just curious about why it
was done that way. But it is fine to keep the logic in `RemoteInputChannel` if
you make sure, that a recycler puts these buffers right (back) into the buffer
queue (I guess, that's in one of the follow-up PRs). This way, we avoid an
additional intermediate component (and the need to interact with it). To
conclude, on a second thought, it is fine as it is.
The thing with `ResultPartitionType` is that without an (intermediate) way
to set `isCreditBased` to `true`, we are not really able to test this code path
on higher levels such as the `NetworkEnvironment` (or maybe I'll see that in
the follow-up PRs as well).
Speaking of tests...I understand that with the switch to credit-based flow
control, some parts will be covered by existing tests, but we also change the
behaviour at some points and the current tests are already a bit sparse. Can
you also add tests for
- the `NetworkEnvironment` changes (into `NetworkEnvironmentTest`),
- `NetworkBufferPool#requestMemorySegments`,
`NetworkBufferPool#recycleMemorySegments` (into `NetworkBufferPoolTest` which
currently is a bit sparse though)
- the changes in `SingleInputGate` (into `SingleInputGateTest`)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---