Skip to content

mv ldb config h

Matthew Von-Maszewski edited this page Jan 1, 2016 · 6 revisions

Status

  • merged to master -
  • code complete - December 31, 2015
  • development started - December 30, 2015

History / Context

Google provided an extremely clean and useful public API for leveldb. Basho continues to work within that framework for most features. However, Basho has added some internal functionality to leveldb that is useful in other contexts. The first items for functionality reuse are the mutex wrappers and hot threads.

The mutex wrappers depend upon several compile time variable declarations. Google's implementation only presents those variable declarations on the compiler's command line. The declarations are therefore not available to independent projects trying to use the mutex wrappers. This branch duplicates the variable declarations into a new header file, leveldb/ldb_config.h. This new header file enables the leveldb mutex wrappers to compile properly when used by independent projects.

Branch Description

.gitignore

This change is a correction to exclude sst_rewrite from git's checkin analysis. The change is to fix a previous branch. It is not directly related to timed compactions.

db/db_impl.cc

Unit testing uncovered a race condition relating to shutdown and background processing of DBImpl::BackgroundCall2() and DBImpl::BackgroundImmCompactCall(). The two routines now contain a test for a shutdown scenario and no longer report an error to the LOG file in that situation.

DBImpl::MakeRoomForWrite() contains logic for accelerating when write buffers flush. THIS LOGIC WAS CHECKED IN TO FACILITATE TESTING. IT PERFORMED POORLY IN TESTING AND MUST BE REMOVED. All changes within this function will be reverted.

db/dbformat.h

Clone this wiki locally