Skip to content

Commit 30ce9c1

Browse files
drymancopybara-github
authored andcommitted
Remove per-chunk flushing to speedup AR write speed.
This gives a huge performance difference for small group size in the pygrain use case. PiperOrigin-RevId: 772929139
1 parent 3344ad1 commit 30ce9c1

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

cpp/sequenced_chunk_writer.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,6 @@ void SequencedChunkWriterBase::TrySubmitFirstFutureChunk(
126126
return;
127127
}
128128
}
129-
if (!chunk_writer->Flush(riegeli::FlushType::kFromObject)) {
130-
Fail(riegeli::Annotate(
131-
chunk_writer->status(),
132-
absl::StrFormat("Could not flush chunk: %d", submitted_chunks_)));
133-
return;
134-
}
135129
if (callback_) {
136130
(*callback_)(submitted_chunks_, chunk_offset, decoded_data_size,
137131
num_records);
@@ -148,9 +142,6 @@ void SequencedChunkWriterBase::Initialize() {
148142
Fail(riegeli::Annotate(chunk_writer->status(),
149143
"Failed to create the file header"));
150144
}
151-
if (!chunk_writer->Flush(riegeli::FlushType::kFromObject)) {
152-
Fail(riegeli::Annotate(chunk_writer->status(), "Could not flush"));
153-
}
154145
}
155146

156147
void SequencedChunkWriterBase::Done() {

0 commit comments

Comments
 (0)