Commit 458418e0 authored by Yoni Fogel's avatar Yoni Fogel

refs #5697 revert r50161 (we don't want stress tests to quit hot indexes early)

git-svn-id: file:///svn/toku/tokudb@50177 c7de825b-a66e-492c-adef-691d508d4ae1
parent 8689af4d
......@@ -132,10 +132,6 @@ cleanup:
return r;
}
static int indexer_maybe_quit_poll(void *UU(poll_extra), float UU(progress)) {
return run_test ? 0 : TOKUDB_CANCELED;
}
static int hi_create_index(DB_TXN* UU(txn), ARG arg, void* UU(operation_extra), void* UU(stats_extra)) {
int r;
DB_TXN* hi_txn = NULL;
......@@ -172,11 +168,8 @@ static int hi_create_index(DB_TXN* UU(txn), ARG arg, void* UU(operation_extra),
CKERR(r);
toku_mutex_unlock(&hi_lock);
r = indexer->set_poll_function(indexer, indexer_maybe_quit_poll, nullptr);
CKERR(r);
r = indexer->build(indexer);
CKERR2s(r, 0, TOKUDB_CANCELED);
CKERR(r);
toku_mutex_lock(&hi_lock);
r = indexer->close(indexer);
......@@ -202,12 +195,7 @@ static int hi_create_index(DB_TXN* UU(txn), ARG arg, void* UU(operation_extra),
memset(&val1, 0, sizeof val1);
memset(&key2, 0, sizeof key2);
memset(&val2, 0, sizeof val2);
uint64_t count = 0;
while(r != DB_NOTFOUND) {
if (count++ % 256 == 0 && !run_test) {
r = TOKUDB_CANCELED;
break;
}
// get next from both cursors and assert they are equal
int r1 = main_cursor->c_get(
main_cursor,
......@@ -230,7 +218,7 @@ static int hi_create_index(DB_TXN* UU(txn), ARG arg, void* UU(operation_extra),
assert(memcmp(val1.data, val2.data, val1.size) == 0);
}
}
CKERR2s(r, DB_NOTFOUND, TOKUDB_CANCELED);
CKERR2(r, DB_NOTFOUND);
r = main_cursor->c_close(main_cursor);
r = hi_cursor->c_close(hi_cursor);
CKERR(r);
......
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