Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Exception should be thrown after 'catch' in AppendOnlyWriter. #2948

Merged
merged 2 commits into from
Mar 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix minus
  • Loading branch information
leaves12138 committed Mar 6, 2024
commit 0ee2585424118146eb0aca8ccd0d478af7517a31
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,17 @@ public void close() throws Exception {
sinkWriter.close();
}

public void toBufferedWriter() throws Exception {
if (sinkWriter != null && !sinkWriter.bufferSpillableWriter()) {
flush(false, false);
trySyncLatestCompaction(true);

sinkWriter.close();
sinkWriter = new BufferedSinkWriter(true);
sinkWriter.setMemoryPool(memorySegmentPool);
}
}

private RowDataRollingFileWriter createRollingRowWriter() {
return new RowDataRollingFileWriter(
fileIO,
Expand All @@ -209,17 +220,6 @@ private RowDataRollingFileWriter createRollingRowWriter() {
statsCollectors);
}

public void toBufferedWriter() throws Exception {
if (sinkWriter != null && !sinkWriter.bufferSpillableWriter()) {
flush(false, false);
trySyncLatestCompaction(true);

sinkWriter.close();
sinkWriter = new BufferedSinkWriter(true);
sinkWriter.setMemoryPool(memorySegmentPool);
}
}

private void trySyncLatestCompaction(boolean blocking)
throws ExecutionException, InterruptedException {
compactManager
Expand Down
Loading