You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ar...@apache.org on 2021/02/25 18:27:10 UTC
[flink] 01/02: [hotfix][core] Recovered IteratorSourceReader
correctly checks splits on start.
This is an automated email from the ASF dual-hosted git repository.
arvid pushed a commit to branch release-1.12
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 4a0f639ae9d9ee2b2eb04addf3aed16179dc01c1
Author: Arvid Heise <ar...@ververica.com>
AuthorDate: Thu Feb 25 13:48:52 2021 +0100
[hotfix][core] Recovered IteratorSourceReader correctly checks splits on start.
Currently, start checks the iterator which is always null before polling. This violates the invariant in notifyNoMoreSplits.
---
.../flink/api/connector/source/lib/util/IteratorSourceReader.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flink-core/src/main/java/org/apache/flink/api/connector/source/lib/util/IteratorSourceReader.java b/flink-core/src/main/java/org/apache/flink/api/connector/source/lib/util/IteratorSourceReader.java
index 52d31ac..5c9ae25 100644
--- a/flink-core/src/main/java/org/apache/flink/api/connector/source/lib/util/IteratorSourceReader.java
+++ b/flink-core/src/main/java/org/apache/flink/api/connector/source/lib/util/IteratorSourceReader.java
@@ -84,7 +84,7 @@ public class IteratorSourceReader<
@Override
public void start() {
// request a split only if we did not get one during restore
- if (iterator == null) {
+ if (remainingSplits == null) {
context.sendSplitRequest();
}
}