mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
[t:4895], protect toku_dictionary_redirect with the MO lock
git-svn-id: file:///svn/toku/tokudb@44048 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
a22fa2be46
commit
bfa379314a
1 changed files with 2 additions and 2 deletions
|
@ -161,11 +161,11 @@ static int ft_loader_close_and_redirect(DB_LOADER *loader) {
|
||||||
loader->i->poll_func, loader->i->poll_extra);
|
loader->i->poll_func, loader->i->poll_extra);
|
||||||
if ( r==0 ) {
|
if ( r==0 ) {
|
||||||
for (int i=0; i<loader->i->N; i++) {
|
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],
|
r = toku_dictionary_redirect(loader->i->inames_in_env[i],
|
||||||
loader->i->dbs[i]->i->ft_handle,
|
loader->i->dbs[i]->i->ft_handle,
|
||||||
db_txn_struct_i(loader->i->txn)->tokutxn);
|
db_txn_struct_i(loader->i->txn)->tokutxn);
|
||||||
toku_ydb_unlock();
|
toku_multi_operation_client_unlock();
|
||||||
if ( r!=0 ) break;
|
if ( r!=0 ) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue