On Thu, Sep 27, 2012 at 06:21:33PM +0800, Sijie Guo wrote: > > I took at look at the leveldb homepage and it says - "Only a single > process > > (possibly multi-threaded) can access a particular database at a time." > > This is bad because it means we can't run the console or any recovery > > related operations while the bookies are running. > > Yes. leveldb is single process. it prevent misuse by acquiring lock from > filesystem. We did can't run the console to look its data while the bookie > is running. Is this write access or read access? Recovery should only need read access
> > I am confusing about the 'recovery' operations you mentioned. what kind of > recovery? > > > When we flush to the log file, we > > should simply flush entries sorted by the ledger id as key. > > If we want to sort when flushing, we need to buffer all edits in memory, > then flush. I am assume this approach would act same as LSM tree (what > leveldb did). Similar, but without the compaction. -Ivan
