diff options
author | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-07-20 12:20:46 +1000 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-07-20 12:24:11 +1000 |
commit | 5a2533ebc3606973fbe237228b9bacdcb21a532b (patch) | |
tree | 66805f578f761446f1cdd6637dcfaa90c60e1388 /src/third_party/wiredtiger/test/utility/thread.c | |
parent | 634435949c4b855b9cc5bfbf5cf481d8158fd996 (diff) | |
download | mongo-5a2533ebc3606973fbe237228b9bacdcb21a532b.tar.gz |
Import wiredtiger: 6173a98979715ed727c432c1a31da64ea8a37048 from branch mongodb-3.6
ref: ff10db8811..6173a98979
for: 3.5.11
WT-3039 Enhance logging so new log files no longer need to wait for the previous log file to be synced
WT-3138 Enhance eviction statistics
WT-3140 Enhance json mode statistics to better support per-dhandle statistics
WT-3310 Add support to WT_SESSION::alter to change table log setting
WT-3329 With a uniform workload and a number of small collections, eviction does a poor job of selecting candidates for eviction.
WT-3381 Improve concurrency in the transaction subsystem
WT-3394 Build WiredTiger with gcc7
WT-3396 test/csuite/wt3363_checkpoint_op_races, test_utility cleanups
WT-3397 Coverity lint
WT-3398 in-memory configurations don't support schema_worker operations
WT-3401 Lint and minor cleanup
WT-3402 Move cached overflow records to the update list.
WT-3403 Automated tests timeout running csuite
WT-3409 WiredTiger generations can silently self-deadlock.
WT-3413 Add more aggressive compile warning flags to Jenkins Windows job
WT-3415 setting timestamp in txn_state requires the global write lock
WT-3421 Compilation error unreachable code in test/csuite/wt3363_checkpoint_op_races
WT-3424 additional gcc 7.1 compile warnings.
WT-3425 workgen: add ability to reopen cursors
WT-3426 Add new wtperf configuration to automated performance testing
WT-3438 Don't tune eviction thread count when the count is fixed
Also explicitly disable v2 log records via a configuration setting in MongoDB -
this will later be plumbed into the feature compatability version mechanism.
Diffstat (limited to 'src/third_party/wiredtiger/test/utility/thread.c')
-rw-r--r-- | src/third_party/wiredtiger/test/utility/thread.c | 96 |
1 files changed, 8 insertions, 88 deletions
diff --git a/src/third_party/wiredtiger/test/utility/thread.c b/src/third_party/wiredtiger/test/utility/thread.c index 4c5202016a5..ed8c7e5ae73 100644 --- a/src/third_party/wiredtiger/test/utility/thread.c +++ b/src/third_party/wiredtiger/test/utility/thread.c @@ -34,7 +34,7 @@ * One thread (the first thread created by an application) checks for a * terminating condition after each insert. */ -void * +WT_THREAD_RET thread_append(void *arg) { TEST_OPTS *opts; @@ -70,75 +70,7 @@ thread_append(void *arg) } } - return (NULL); -} - -/* - * Append into a row store table. - */ -void * -thread_insert_append(void *arg) -{ - TEST_OPTS *opts; - WT_CONNECTION *conn; - WT_CURSOR *cursor; - WT_SESSION *session; - uint64_t i; - char kbuf[64]; - - opts = (TEST_OPTS *)arg; - conn = opts->conn; - - testutil_check(conn->open_session(conn, NULL, NULL, &session)); - testutil_check(session->open_cursor( - session, opts->uri, NULL, NULL, &cursor)); - - for (i = 0; i < opts->nrecords; ++i) { - testutil_check(__wt_snprintf( - kbuf, sizeof(kbuf), "%010d KEY------", (int)i)); - cursor->set_key(cursor, kbuf); - cursor->set_value(cursor, "========== VALUE ======="); - testutil_check(cursor->insert(cursor)); - if (i % 100000 == 0) { - printf("insert: %" PRIu64 "\r", i); - fflush(stdout); - } - } - printf("\n"); - - opts->running = false; - - return (NULL); -} - -/* - * Repeatedly walk backwards through the records in a table. - */ -void * -thread_prev(void *arg) -{ - TEST_OPTS *opts; - WT_CURSOR *cursor; - WT_SESSION *session; - int ret; - - opts = (TEST_OPTS *)arg; - ret = 0; - - testutil_check( - opts->conn->open_session(opts->conn, NULL, NULL, &session)); - testutil_check( - session->open_cursor(session, opts->uri, NULL, NULL, &cursor)); - while (opts->running) { - while (opts->running && (ret = cursor->prev(cursor)) == 0) - ; - if (ret == WT_NOTFOUND) - ret = 0; - testutil_check(ret); - } - - testutil_check(session->close(session, NULL)); - return (NULL); + return (WT_THREAD_RET_VALUE); } /* @@ -198,7 +130,7 @@ handle_op_message(WT_EVENT_HANDLER *handler, /* * Create a table and open a bulk cursor on it. */ -void * +void op_bulk(void *arg) { TEST_OPTS *opts; @@ -228,14 +160,12 @@ op_bulk(void *arg) testutil_check(session->close(session, NULL)); args->thread_counter++; - - return (NULL); } /* * Create a guaranteed unique table and open and close a bulk cursor on it. */ -void * +void op_bulk_unique(void *arg) { TEST_OPTS *opts; @@ -286,14 +216,12 @@ op_bulk_unique(void *arg) testutil_check(session->close(session, NULL)); args->thread_counter++; - - return (NULL); } /* * Open and close cursor on a table. */ -void * +void op_cursor(void *arg) { TEST_OPTS *opts; @@ -317,14 +245,12 @@ op_cursor(void *arg) testutil_check(session->close(session, NULL)); args->thread_counter++; - - return (NULL); } /* * Create a table. */ -void * +void op_create(void *arg) { TEST_OPTS *opts; @@ -344,14 +270,12 @@ op_create(void *arg) testutil_check(session->close(session, NULL)); args->thread_counter++; - - return (NULL); } /* * Create and drop a unique guaranteed table. */ -void * +void op_create_unique(void *arg) { TEST_OPTS *opts; @@ -389,14 +313,12 @@ op_create_unique(void *arg) testutil_check(session->close(session, NULL)); args->thread_counter++; - - return (NULL); } /* * Drop a table. */ -void * +void op_drop(void *arg) { TEST_PER_THREAD_OPTS *args; @@ -419,6 +341,4 @@ op_drop(void *arg) testutil_check(session->close(session, NULL)); args->thread_counter++; - - return (NULL); } |