mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
[t:4304], fix issue by moving invariant checks further down
git-svn-id: file:///svn/toku/tokudb@37997 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
95f96be914
commit
243c3d1d21
1 changed files with 2 additions and 2 deletions
|
@ -3165,8 +3165,6 @@ toku_cachetable_begin_checkpoint (CACHETABLE ct, TOKULOGGER logger) {
|
||||||
assert(r==0);
|
assert(r==0);
|
||||||
}
|
}
|
||||||
cachetable_lock(ct);
|
cachetable_lock(ct);
|
||||||
ct->checkpoint_is_beginning = TRUE; // detect threadsafety bugs, must set checkpoint_is_beginning ...
|
|
||||||
invariant(ct->checkpoint_prohibited == 0); // ... before testing checkpoint_prohibited
|
|
||||||
//Initialize accountability counters
|
//Initialize accountability counters
|
||||||
ct->checkpoint_num_files = 0;
|
ct->checkpoint_num_files = 0;
|
||||||
ct->checkpoint_num_txns = 0;
|
ct->checkpoint_num_txns = 0;
|
||||||
|
@ -3241,6 +3239,8 @@ toku_cachetable_begin_checkpoint (CACHETABLE ct, TOKULOGGER logger) {
|
||||||
|
|
||||||
unsigned int npending = 0;
|
unsigned int npending = 0;
|
||||||
rwlock_write_lock(&ct->pending_lock, ct->mutex);
|
rwlock_write_lock(&ct->pending_lock, ct->mutex);
|
||||||
|
ct->checkpoint_is_beginning = TRUE; // detect threadsafety bugs, must set checkpoint_is_beginning ...
|
||||||
|
invariant(ct->checkpoint_prohibited == 0); // ... before testing checkpoint_prohibited
|
||||||
for (i=0; i < ct->table_size; i++) {
|
for (i=0; i < ct->table_size; i++) {
|
||||||
PAIR p;
|
PAIR p;
|
||||||
for (p = ct->table[i]; p; p=p->hash_chain) {
|
for (p = ct->table[i]; p; p=p->hash_chain) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue