Commit 67fa6c4c authored by Yoni Fogel's avatar Yoni Fogel

[t:2542] cleaner way of holding ydb lock around pre_acquire_table_lock

git-svn-id: file:///svn/toku/tokudb@19587 c7de825b-a66e-492c-adef-691d508d4ae1
parent a188bda4
...@@ -164,9 +164,7 @@ int toku_loader_create_loader(DB_ENV *env, ...@@ -164,9 +164,7 @@ int toku_loader_create_loader(DB_ENV *env,
// lock tables and check empty // lock tables and check empty
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
if (!(loader_flags&DB_PRELOCKED_WRITE)) { if (!(loader_flags&DB_PRELOCKED_WRITE)) {
toku_ydb_lock(); //Must hold ydb lock for pre_acquire r = dbs[i]->pre_acquire_table_lock(dbs[i], txn);
r = toku_db_pre_acquire_table_lock(dbs[i], txn, FALSE);
toku_ydb_unlock();
if (r!=0) break; if (r!=0) break;
} }
r = verify_empty(dbs[i], txn); r = verify_empty(dbs[i], txn);
......
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