diff --git a/test/check_merge.cpp b/test/check_merge.cpp index 4a124bc..690cc5f 100644 --- a/test/check_merge.cpp +++ b/test/check_merge.cpp @@ -55,14 +55,13 @@ void insertProbeIter(size_t NUM_ENTRIES) recordid table_root = ltable.allocTable(xid); Tcommit(xid); - - xid = Tbegin(); + writelock(ltable.header_lock,0); int lindex = mscheduler.addlogtable(<able); ltable.setMergeData(mscheduler.getMergeData(lindex)); - - mscheduler.startlogtable(lindex); + mscheduler.startlogtable(lindex); + unlock(ltable.header_lock); printf("Stage 1: Writing %d keys\n", NUM_ENTRIES); struct timeval start_tv, stop_tv, ti_st, ti_end; @@ -102,7 +101,6 @@ void insertProbeIter(size_t NUM_ENTRIES) printf("datasize: %lld\n", (long long)datasize); //sleep(20); - Tcommit(xid); xid = Tbegin(); diff --git a/test/check_mergelarge.cpp b/test/check_mergelarge.cpp index ca00f3f..02c8237 100644 --- a/test/check_mergelarge.cpp +++ b/test/check_mergelarge.cpp @@ -54,13 +54,13 @@ void insertProbeIter(size_t NUM_ENTRIES) recordid table_root = ltable.allocTable(xid); Tcommit(xid); - - //xid = Tbegin(); + writelock(ltable.header_lock,0); int lindex = mscheduler.addlogtable(<able); ltable.setMergeData(mscheduler.getMergeData(lindex)); - + mscheduler.startlogtable(lindex); + unlock(ltable.header_lock); printf("Stage 1: Writing %d keys\n", NUM_ENTRIES); diff --git a/test/check_mergetuple.cpp b/test/check_mergetuple.cpp index 668dbc8..18ba05a 100644 --- a/test/check_mergetuple.cpp +++ b/test/check_mergetuple.cpp @@ -112,13 +112,12 @@ void insertProbeIter(size_t NUM_ENTRIES) recordid table_root = ltable.allocTable(xid); Tcommit(xid); - - xid = Tbegin(); - + writelock(ltable.header_lock,0); int lindex = mscheduler.addlogtable(<able); ltable.setMergeData(mscheduler.getMergeData(lindex)); - + mscheduler.startlogtable(lindex); + unlock(ltable.header_lock); printf("Stage 1: Writing %d keys\n", NUM_ENTRIES); @@ -197,7 +196,6 @@ void insertProbeIter(size_t NUM_ENTRIES) printf("\nTREE STRUCTURE\n"); printf("datasize: %lld\n", datasize); - Tcommit(xid); xid = Tbegin();