fix compiler warnings
remove lmdb scan lock