Commit ca781db0 authored by John Esmet's avatar John Esmet Committed by Yoni Fogel

fix DRD failures in the threaded stress framework and locktree


git-svn-id: file:///svn/toku/tokudb@49960 c7de825b-a66e-492c-adef-691d508d4ae1
parent dd0f0a19
......@@ -55,6 +55,7 @@ void locktree::create(manager::memory_tracker *mem_tracker, DICTIONARY_ID dict_i
TOKU_VALGRIND_HG_DISABLE_CHECKING(
&m_lock_request_info.should_retry_lock_requests,
sizeof(m_lock_request_info.should_retry_lock_requests));
TOKU_DRD_IGNORE_VAR(m_lock_request_info.should_retry_lock_requests);
}
void locktree::destroy(void) {
......@@ -324,7 +325,10 @@ void locktree::reset_single_txnid_optimization(TXNID txnid) {
bool locktree::try_single_txnid_release_optimization(TXNID txnid) {
bool released = false;
if (m_single_txnid_optimization_possible) {
TOKU_DRD_IGNORE_VAR(m_single_txnid_optimization_possible);
bool optimization_possible = m_single_txnid_optimization_possible;
TOKU_DRD_STOP_IGNORING_VAR(m_single_txnid_optimization_possible);
if (optimization_possible) {
// check the bit again with a prepared locked keyrange,
// which protects the optimization bits and rangetree data
concurrent_tree::locked_keyrange lkr;
......
......@@ -1129,7 +1129,7 @@ static int UU()update_op2(DB_TXN* txn, ARG arg, void* UU(operation_extra), void
DBT key, val;
int rand_key;
int rand_key2;
update_count++;
toku_sync_fetch_and_add(&update_count, 1);
struct update_op_extra extra;
ZERO_STRUCT(extra);
extra.type = UPDATE_ADD_DIFF;
......@@ -1189,14 +1189,14 @@ UU() update_op_db(DB *db, DB_TXN *txn, ARG arg, void* operation_extra, void *UU(
int curr_val_sum = 0;
DBT key, val;
int update_key;
update_count++;
uint64_t old_update_count = toku_sync_fetch_and_add(&update_count, 1);
struct update_op_args* CAST_FROM_VOIDP(op_args, operation_extra);
struct update_op_extra extra;
ZERO_STRUCT(extra);
extra.type = UPDATE_ADD_DIFF;
extra.pad_bytes = 0;
if (op_args->update_pad_frequency) {
if (update_count % (2*op_args->update_pad_frequency) == update_count%op_args->update_pad_frequency) {
if (old_update_count % (2*op_args->update_pad_frequency) == old_update_count%op_args->update_pad_frequency) {
extra.pad_bytes = 100;
}
}
......@@ -1307,10 +1307,10 @@ static int UU() update_with_history_op(DB_TXN *txn, ARG arg, void* operation_ext
struct update_op_extra extra;
ZERO_STRUCT(extra);
extra.type = UPDATE_WITH_HISTORY;
update_count++;
uint64_t old_update_count = toku_sync_fetch_and_add(&update_count, 1);
extra.pad_bytes = 0;
if (op_args->update_pad_frequency) {
if (update_count % (2*op_args->update_pad_frequency) != update_count%op_args->update_pad_frequency) {
if (old_update_count % (2*op_args->update_pad_frequency) != old_update_count%op_args->update_pad_frequency) {
extra.pad_bytes = 500;
}
}
......
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