Skip to content

Commit

Permalink
Ensures no concurrent submit chunk when max_parallelism=1
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 516513330
  • Loading branch information
dryman authored and copybara-github committed Mar 14, 2023
1 parent 9474099 commit 5e60cb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/array_record_writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ bool ArrayRecordWriterBase::WriteRecordImpl(Record&& record) {
return false;
}
chunk_encoder_ = CreateEncoder();
if (pool_) {
if (pool_ && options_.max_parallelism().value() > 1) {
std::shared_ptr<riegeli::ChunkEncoder> shared_encoder =
std::move(encoder);
submit_chunk_callback_->TrackConcurrentChunkWriters();
Expand Down

0 comments on commit 5e60cb1

Please sign in to comment.