Commit f8499b06 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

refs #5467, do checkpoitn at end of tokudb_add_index

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@47745 c7de825b-a66e-492c-adef-691d508d4ae1
parent 937c4a88
......@@ -7693,6 +7693,17 @@ int ha_tokudb::tokudb_add_index(
write_key_name_to_status(share->status_block, key_info[i].name, txn);
}
pthread_mutex_unlock(&share->mutex);
// the transaction that does either a bulk load or a hot index
// will need to do a checkpoint during commit, which may be
// expensive. This may block other threads because the commit
// takes place when MySQL's metadata lock is held. So,
// reduce the time it takes for that checkpoint to happen,
// we run a checkpoint right now.
error = db_env->txn_checkpoint(db_env, 0, 0, 0);
if (error) {
goto cleanup;
}
error = 0;
cleanup:
......
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