zhijiangW commented on a change in pull request #11877:
URL: https://github.com/apache/flink/pull/11877#discussion_r422889022
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/CreditBasedSequenceNumberingViewReader.java
##########
@@ -94,13 +99,27 @@ public void requestSubpartitionView(
}
@Override
- public void addCredit(int creditDeltas) {
+ public boolean addCredit(int creditDeltas) {
numCreditsAvailable += creditDeltas;
+ return shouldAnnounceBacklog();
+ }
+
+ @Override
+ public boolean shouldAnnounceBacklog() {
+ return initialCredit == 0 && numCreditsAvailable == 0 &&
subpartitionView.isAvailable(Integer.MAX_VALUE);
}
@Override
- public void resumeConsumption() {
+ public boolean resumeConsumption(int availableCredit, int
unfulfilledBacklog) {
+ if (initialCredit > 0) {
+ checkState(numCreditsAvailable == availableCredit,
"Illegal number of available credit.");
Review comment:
I guess this check is not necessary or invalid.
----------------------------------------------------------------
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]