Skip to content

Commit

Permalink
KUDU-1555. PBC Flush() method should be async
Browse files Browse the repository at this point in the history
WritablePBContainerFile::Flush is meant to flush the data
asynchronously. But, e6052ac accidentally regressed this functionality
and switched it to synchronous.

This caused a lack of parallelism in the LogBlockManager flush path,
since it uses PBC files for the metadata. The async flushing of LBM data
blocks ended up being basically synchronous, so each disk would have to
wait for the prior disk to complete its flush before it started any IO.

I tested this change on a YCSB workload and throughput increased almost
2x.

Change-Id: I721707070fe47e3377d791c95214f007c90d2263
Reviewed-on: http://gerrit.cloudera.org:8080/3951
Tested-by: Kudu Jenkins
Reviewed-by: Mike Percy <[email protected]>
  • Loading branch information
toddlipcon committed Aug 12, 2016
1 parent 564eb4e commit af5c059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kudu/util/pb_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ Status WritablePBContainerFile::Flush() {
DCHECK_EQ(FileState::OPEN, state_);

// TODO: Flush just the dirty bytes.
RETURN_NOT_OK_PREPEND(writer_->Flush(RWFile::FLUSH_SYNC, 0, 0), "Failed to Flush() file");
RETURN_NOT_OK_PREPEND(writer_->Flush(RWFile::FLUSH_ASYNC, 0, 0), "Failed to Flush() file");

return Status::OK();
}
Expand Down

0 comments on commit af5c059

Please sign in to comment.