mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
[t:2542] Prevent extra file and fsync during non-put loader
git-svn-id: file:///svn/toku/tokudb@19618 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
23c57550fb
commit
ef89d27bbb
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue