Commit 5b7546ff authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel
Browse files

#4434 must use DB_THREAD in multi-thread BDB apps refs[t:4434]

git-svn-id: file:///svn/toku/tokudb@39168 c7de825b-a66e-492c-adef-691d508d4ae1
parent c2433901
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -197,13 +197,10 @@ int test_main(int argc, char * const argv[]) {
    // create the db
    DB *db = NULL;
    r = db_create(&db, db_env, 0); assert(r == 0);
    DB_TXN *create_txn = NULL;
    r = db_env->txn_begin(db_env, NULL, &create_txn, 0); assert(r == 0);
    if (pagesize) {
        r = db->set_pagesize(db, pagesize); assert(r == 0);
    }
    r = db->open(db, create_txn, db_filename, NULL, DB_BTREE, DB_CREATE, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); assert(r == 0);
    r = create_txn->commit(create_txn, 0); assert(r == 0);
    r = db->open(db, NULL, db_filename, NULL, DB_BTREE, DB_CREATE|DB_AUTO_COMMIT|DB_THREAD, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); assert(r == 0);

    // populate the db
    populate(db_env, db, nrows);
+1 −4
Original line number Diff line number Diff line
@@ -195,13 +195,10 @@ int test_main(int argc, char * const argv[]) {
    // create the db
    DB *db = NULL;
    r = db_create(&db, db_env, 0); assert(r == 0);
    DB_TXN *create_txn = NULL;
    r = db_env->txn_begin(db_env, NULL, &create_txn, 0); assert(r == 0);
    if (pagesize) {
        r = db->set_pagesize(db, pagesize); assert(r == 0);
    }
    r = db->open(db, create_txn, db_filename, NULL, DB_BTREE, DB_CREATE, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); assert(r == 0);
    r = create_txn->commit(create_txn, 0); assert(r == 0);
    r = db->open(db, NULL, db_filename, NULL, DB_BTREE, DB_CREATE|DB_AUTO_COMMIT|DB_THREAD, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); assert(r == 0);

    // populate the db
    populate(db_env, db, nrows);
+1 −4
Original line number Diff line number Diff line
@@ -149,13 +149,10 @@ int test_main(int argc, char * const argv[]) {
    // create the db
    DB *db = NULL;
    r = db_create(&db, db_env, 0); assert(r == 0);
    DB_TXN *create_txn = NULL;
    r = db_env->txn_begin(db_env, NULL, &create_txn, 0); assert(r == 0);
    if (pagesize) {
        r = db->set_pagesize(db, pagesize); assert(r == 0);
    }
    r = db->open(db, create_txn, db_filename, NULL, DB_BTREE, DB_CREATE, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); assert(r == 0);
    r = create_txn->commit(create_txn, 0); assert(r == 0);
    r = db->open(db, NULL, db_filename, NULL, DB_BTREE, DB_CREATE|DB_AUTO_COMMIT|DB_THREAD, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); assert(r == 0);

    run_test(db_env, db, nthreads, nrows, sleeptime);

+1 −4
Original line number Diff line number Diff line
@@ -166,13 +166,10 @@ int test_main(int argc, char * const argv[]) {
    // create the db
    DB *db = NULL;
    r = db_create(&db, db_env, 0); assert(r == 0);
    DB_TXN *create_txn = NULL;
    r = db_env->txn_begin(db_env, NULL, &create_txn, 0); assert(r == 0);
    if (pagesize) {
        r = db->set_pagesize(db, pagesize); assert(r == 0);
    }
    r = db->open(db, create_txn, db_filename, NULL, DB_BTREE, DB_CREATE, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); assert(r == 0);
    r = create_txn->commit(create_txn, 0); assert(r == 0);
    r = db->open(db, NULL, db_filename, NULL, DB_BTREE, DB_CREATE|DB_AUTO_COMMIT|DB_THREAD, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); assert(r == 0);

    // populate the db
    populate(db_env, db, nrows);
+1 −4
Original line number Diff line number Diff line
@@ -166,13 +166,10 @@ int test_main(int argc, char * const argv[]) {
    // create the db
    DB *db = NULL;
    r = db_create(&db, db_env, 0); assert(r == 0);
    DB_TXN *create_txn = NULL;
    r = db_env->txn_begin(db_env, NULL, &create_txn, 0); assert(r == 0);
    if (pagesize) {
        r = db->set_pagesize(db, pagesize); assert(r == 0);
    }
    r = db->open(db, create_txn, db_filename, NULL, DB_BTREE, DB_CREATE, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); assert(r == 0);
    r = create_txn->commit(create_txn, 0); assert(r == 0);
    r = db->open(db, NULL, db_filename, NULL, DB_BTREE, DB_CREATE|DB_AUTO_COMMIT|DB_THREAD, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); assert(r == 0);

    // populate the db
    populate(db_env, db, nrows);
Loading