Commit c4b286af authored by John Esmet's avatar John Esmet Committed by Yoni Fogel

refs #5179 improve comment for get_next_ule that fixed hot indexing but, and...

refs #5179 improve comment for get_next_ule that fixed hot indexing but, and document the client contract regarding hot db writes and index create/abort/close


git-svn-id: file:///svn/toku/tokudb@45190 c7de825b-a66e-492c-adef-691d508d4ae1
parent c38ff36d
......@@ -410,7 +410,8 @@ build_index(DB_INDEXER *indexer) {
// grab the next leaf entry and get its provisional info. we'll
// need the provisional info for the undo-do algorithm, and we get
// it here so it can be read atomically with respect to txn commit
// and abort.
// and abort. the atomicity comes from the root-to-leaf path pinned
// by the query and in the getf callback function
//
// this allocates space for the prov info, so we have to destroy it
// when we're done.
......@@ -471,6 +472,7 @@ build_index(DB_INDEXER *indexer) {
return result;
}
// Clients must not operate on any of the hot dbs concurrently with close
static int
close_indexer(DB_INDEXER *indexer) {
int r = 0;
......@@ -498,6 +500,7 @@ close_indexer(DB_INDEXER *indexer) {
return r;
}
// Clients must not operate on any of the hot dbs concurrently with abort
static int
abort_indexer(DB_INDEXER *indexer) {
(void) __sync_fetch_and_sub(&STATUS_VALUE(INDEXER_CURRENT), 1);
......
......@@ -43,6 +43,8 @@ void toku_indexer_unlock(DB_INDEXER* indexer);
//
// Returns 0 if the indexer has been created and sets *indexer to the indexer object.
// If an error occurred while creating the indexer object, a non-zero error number is returned.
//
// Clients must not operate on any of the dest_dbs concurrently with create_indexer();
int toku_indexer_create_indexer(DB_ENV *env,
DB_TXN *txn,
DB_INDEXER **indexer,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment