Review Board 1.7.22


BOOKKEEPER-137 Do not create Ledger index files until absolutely necessary.

Review Request #3661 - Created Jan. 27, 2012 and updated

Ivan Kelly
BOOKKEEPER-137
Reviewers
bookkeeper
bookkeeper-git
This is an optimization to speed up the case where we have many ledgers and are writing to them at random (a benchmark case we currently have). Currently, we create the ledger index file and write the first 1k of it to disk immediately. With a lot of ledgers being randomly written to, this means a lot of random writes on the ledger disk. This fix postpones the creation of the index file and writing of the first 1k until the first flush of the ledger.

This patch includes BOOKKEEPER-136, as they both deal in the same area, and I found it difficult to separate them.

BOOKKEEPER-135 is not required for this patch, and will need modifications after this goes in.

 
Review request changed
Updated (Feb. 8, 2012, 3:53 p.m.)
Fixed compile error
Ship it!
Posted (Feb. 9, 2012, 10:52 a.m.)
thanks Ivan for explanation. the new patch is ok for me. +1