mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
Fix #5369 (partitioned counter asserts because it expects the counter to go monotonically up, but part of the test decrements). Change it so that it only increments in the test.
git-svn-id: file:///svn/toku/tokudb@46778 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
cdebca297c
commit
8cc19d274c
1 changed files with 3 additions and 3 deletions
|
@ -290,12 +290,12 @@ static void *reader_test_fun (void *ta_v) {
|
|||
while (ta->unfinished_count>0) {
|
||||
uint64_t thisval = read_partitioned_counter(ta->pc);
|
||||
assert(lastval <= thisval);
|
||||
assert(thisval <= ta->limit);
|
||||
assert(thisval <= ta->limit+2);
|
||||
lastval = thisval;
|
||||
if (verboseness_cmdarg && (0==(thisval & (thisval-1)))) printf("ufc=%ld Thisval=%ld\n", ta->unfinished_count,thisval);
|
||||
}
|
||||
uint64_t thisval = read_partitioned_counter(ta->pc);
|
||||
assert(thisval==ta->limit);
|
||||
assert(thisval==ta->limit+2); // we incremented two extra times in the test
|
||||
return ta_v;
|
||||
}
|
||||
|
||||
|
@ -333,7 +333,7 @@ static void do_testit (void) {
|
|||
for (uint64_t j=0; j<n_writers[i] ; j++) {
|
||||
pt_create(&writer_threads[i][j], writer_test_fun, &tas[i]);
|
||||
}
|
||||
increment_partitioned_counter(tas[i].pc, -1); // make sure that the long-lived thread also increments the partitioned counter, to test for #5321.
|
||||
increment_partitioned_counter(tas[i].pc, 1); // make sure that the long-lived thread also increments the partitioned counter, to test for #5321.
|
||||
}
|
||||
for (int i=0; i<NGROUPS; i++) {
|
||||
pt_join(reader_threads[i], &tas[i]);
|
||||
|
|
Loading…
Add table
Reference in a new issue