4 ms·
This is a fairly minor nit, but a persistent one nonetheless: you keep claiming to have removed unsafe features from LMDB, yet you left the most dangerous one i
by _wmd 12y ago
This is a fairly minor nit, but a persistent one nonetheless: you keep claiming to have removed unsafe features from LMDB, yet you left the most dangerous one in there: NOSYNC provides no consistency guarantees whatsoever, whereas e.g. with NOMETASYNC you merely lose durability. In particular NOMETASYNC retained crash safety, which you don't get at all with NOSYNC.
The way this is worded, it sounds like an improvement, but in reality bolt is no safer to use than LMDB was, it just lacks some configurable tradeoffs that were present in the original engine, and were safer to use than those that remain in bolt.
That said, I'm happy to see APPEND go ;)
- benbjohnson 12y agoThat's a fair point. Although I'd argue that WRITEMAP and APPEND are more scary. :) I try to point out in the docs that DB.NoSync should only be used for offline bulk loading where corruption is typically less of an issue (since you can simply rebuild). https://godoc.org/github.com/boltdb/bolt#DB https://godoc.org/github.com/boltdb/bolt#DB The wording was intended to make it sound like an improvement for people wanting smaller, more concise code bases. Bolt is 2KLOC vs LMDB's 8KLOC. Smaller surface area makes it easier to test thoroughly. It's definitely a tradeoff for people who want that really low level control though.
- hyc_symas 12y agoLMDB author here - what have you got against APPEND? Fast bulk-loading is pretty important when you're initializing a system. Note that APPEND mode won't allow you to corrupt the DB, despite what the doc says - you'll get a KEYEXIST error if you try to load out of order. We just left the doc unchanged to emphasize the importance of using sorted input.
- benbjohnson 12y agoThanks, Howard. That's good to know. The docs always scared me away from using it at all.
- hyc_symas 12y agoPerhaps it's time for us to update the doc to reflect reality...