Lock leveldb and dummy dbs