wiredtiger/wiredtiger — pull request #251 by keithbostic (2012-06-29 14:30:00+00:00)
Title: Ckpt meta flush

Checkpoint has to flush the metadata file, but only after it's flushed all of the other files (in summary, we walk the set of files and checkpoint each of them, which updates WiredTiger.wt, then we checkpoint WiredTiger.wt, which updates WiredTiger.turtle, which is flushed to disk).

Michael, in short, we're not flushing the metadata file after checkpoint. I didn't track it back, but my guess is we lost the schema file flush somewhere along the line of doing all the checkpoint code shuffling.

My fix was to change the __wt_conn_btree_apply and __wt_meta_btree_apply functions to apply the specified function to the meta-data file, after applying it to all other files. I'm not sure if this is the right fix (I don't know what general purpose use you have planned for the __wt_conn_btree_apply and __wt_meta_btree_apply functions and if this change screws that up). The alternative I considered was changing the __wt_txn_checkpoint() itself to flush the meta-data file immediately before the call to __wt_meta_track_off, that might be simpler, but it requires additional locking and handle manipulation inside of __wt_txn_checkpoint.