Commit 4b5bba51 authored by Yoni Fogel's avatar Yoni Fogel

[t:2542] Prevent extra file and fsync during non-put loader

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