Commit 7e518771 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

refs #4964, add some comments for changing a descriptor

git-svn-id: file:///svn/toku/tokudb@45060 c7de825b-a66e-492c-adef-691d508d4ae1
parent 0af8f4f8
......@@ -3071,6 +3071,10 @@ verify_builtin_comparisons_consistent(FT_HANDLE t, u_int32_t flags) {
return 0;
}
//
// See comments in toku_db_change_descriptor to understand invariants
// in the system when this function is called
//
int
toku_ft_change_descriptor(
FT_HANDLE ft_h,
......
......@@ -466,6 +466,12 @@ int toku_db_pre_acquire_fileops_lock(DB *db, DB_TXN *txn) {
// This function is used both to set an initial descriptor of a DB and to
// change a descriptor. (only way to set a descriptor of a DB)
//
// Requires:
// - The caller must not call put_multiple, del_multiple, or update_multiple concurrently
// - The caller must not have a hot index running concurrently on db
// - If the caller has passed DB_UPDATE_CMP_DESCRIPTOR as a flag, then he is calling this function
// ONLY immediately after creating the dictionary and before doing any actual work on the dictionary.
//
static int
toku_db_change_descriptor(DB *db, DB_TXN* txn, const DBT* descriptor, u_int32_t flags) {
HANDLE_PANICKED_DB(db);
......
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