Commit 38c4fec1 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:4895], protect toku_dictionary_redirect with the MO lock

git-svn-id: file:///svn/toku/tokudb@44048 c7de825b-a66e-492c-adef-691d508d4ae1
parent df06c796
......@@ -161,11 +161,11 @@ static int ft_loader_close_and_redirect(DB_LOADER *loader) {
loader->i->poll_func, loader->i->poll_extra);
if ( r==0 ) {
for (int i=0; i<loader->i->N; i++) {
toku_ydb_lock(); //Must hold ydb lock for dictionary_redirect.
toku_multi_operation_client_lock(); //Must hold MO lock for dictionary_redirect.
r = toku_dictionary_redirect(loader->i->inames_in_env[i],
loader->i->dbs[i]->i->ft_handle,
db_txn_struct_i(loader->i->txn)->tokutxn);
toku_ydb_unlock();
toku_multi_operation_client_unlock();
if ( r!=0 ) break;
}
}
......
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