danny0405 commented on a change in pull request #3123:
URL: https://github.com/apache/hudi/pull/3123#discussion_r655222981
##########
File path:
hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteFunction.java
##########
@@ -494,7 +493,7 @@ private boolean flushBucket(DataBucket bucket) {
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)) {
Review comment:
Yeah, the code before is null safe, but it has problem in current master
because the while loop may change the instant to be null: when the coordinator
commit the last instant but not start a new one yet.
--
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]