1
0

[HUDI-2049] StreamWriteFunction should wait for the next inflight instant time before flushing (#3123)

This commit is contained in:
Danny Chan
2021-06-21 20:15:27 +08:00
committed by GitHub
parent 429e9fb5fe
commit adf167991a

View File

@@ -54,7 +54,6 @@ import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import java.util.function.BiFunction;
@@ -494,7 +493,7 @@ public class StreamWriteFunction<K, I, O>
long waitingTime = 0L;
long ckpTimeout = config.getLong(FlinkOptions.WRITE_COMMIT_ACK_TIMEOUT);
long interval = 500L;
while (Objects.equals(instant, this.currentInstant)) {
while (instant == null || instant.equals(this.currentInstant)) {
// sleep for a while
try {
if (waitingTime > ckpTimeout) {