Skip to content

Commit

Permalink
[INLONG-9925][Sort] Add if statement to solve continuously printing l…
Browse files Browse the repository at this point in the history
…ogs (#9961)
  • Loading branch information
XiaoYou201 authored Apr 11, 2024
1 parent 3d47169 commit bf8d1f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,11 @@ public void initializeState(FunctionInitializationContext context) throws Except

@Override
public synchronized void flush() throws IOException {
// when batch count > 0, execute flush operation
if (batchCount == 0) {
return;
}
checkFlushException();

for (int i = 0; i <= executionOptions.getMaxRetries(); i++) {
try {
attemptFlush();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,10 @@ public void initializeState(FunctionInitializationContext context) throws Except

@Override
public synchronized void flush() throws IOException {
// when batch count > 0, execute flush operation
if (batchCount == 0) {
return;
}
checkFlushException();
attemptFlush();
batchCount = 0;
Expand Down

0 comments on commit bf8d1f7

Please sign in to comment.