Skip to content

Commit

Permalink
dirty flush only work when open flush (#70)
Browse files Browse the repository at this point in the history
Co-authored-by: alantong(佟明达) <[email protected]>
  • Loading branch information
vintmd and vintmd authored Jul 19, 2022
1 parent b949102 commit ba4cbb7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ public synchronized void flush() throws IOException {

private void innerFlush(boolean closeStream) throws IOException {
this.checkOpened();
if (!this.dirty) {
// when close flush data to cos, each time data not upload,
// at this time if we close stream, it is not dirty but also has data need to upload
// so the dirty flag only useful when flush cos enabled.
if (!this.dirty && this.flushCOSEnabled) {
LOG.debug("The stream is up-to-date, no need to refresh.");
return;
}
Expand Down

0 comments on commit ba4cbb7

Please sign in to comment.