Implementing transactions on top of LevelDB batches as holds that block committing an otherwise ready batch if still open, yet themselves blocked before opening if the batch is ready but waiting. I have the feeling someone must have done that before...
TFW you realize you didn't implement nested transactions, and doing it would require dynamic scoping, but your language doesn't provide it and your blown up deadline means don't have time to add a reader monad transformation to all your monads.
Read my blog!