Loading src/tests/recover-test_crash_in_flusher_thread.h +5 −3 Original line number Diff line number Diff line Loading @@ -63,21 +63,23 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { } // make the guy that updates the db struct update_op_args uoe = get_update_op_args(cli_args, NULL); myargs[0].operation_extra = &uoe; myargs[0].operation = update_op; //myargs[0].update_pad_frequency = 0; db_env_set_flusher_thread_callback(ft_callback, env); run_workers(myargs, num_threads, cli_args->time_of_test, true); run_workers(myargs, num_threads, cli_args->time_of_test, true, cli_args); } static int run_recover_ft_test(int argc, char *const argv[]) { struct cli_args args = DEFAULT_ARGS; struct cli_args args = get_default_args(); // make test time arbitrarily high because we expect a crash args.time_of_test = 1000000000; args.num_elements = 2000; // we want to induce a checkpoint args.checkpointing_period = 0; args.env_args.checkpointing_period = 0; parse_stress_test_args(argc, argv, &args); if (args.do_test_and_crash) { stress_test_main(&args); Loading src/tests/recover-test_stress1.c +22 −11 Original line number Diff line number Diff line Loading @@ -55,29 +55,40 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { for (int i = 0; i < num_threads; i++) { arg_init(&myargs[i], n, dbp, env, cli_args); } struct scan_op_extra soe[4]; // make the forward fast scanner myargs[0].fast = TRUE; myargs[0].fwd = TRUE; soe[0].fast = TRUE; soe[0].fwd = TRUE; soe[0].prefetch = FALSE; myargs[0].operation_extra = &soe[0]; myargs[0].operation = scan_op; // make the forward slow scanner myargs[1].fast = FALSE; myargs[1].fwd = TRUE; soe[1].fast = FALSE; soe[1].fwd = TRUE; soe[1].prefetch = FALSE; myargs[1].operation_extra = &soe[1]; myargs[1].operation = scan_op; // make the backward fast scanner myargs[2].fast = TRUE; myargs[2].fwd = FALSE; soe[2].fast = TRUE; soe[2].fwd = FALSE; soe[2].prefetch = FALSE; myargs[2].operation_extra = &soe[2]; myargs[2].operation = scan_op; // make the backward slow scanner myargs[3].fast = FALSE; myargs[3].fwd = FALSE; soe[3].fast = FALSE; soe[3].fwd = FALSE; soe[3].prefetch = FALSE; myargs[3].operation_extra = &soe[3]; myargs[3].operation = scan_op; struct update_op_args uoe = get_update_op_args(cli_args, NULL); // make the guy that updates the db for (int i = 4; i < 4 + cli_args->num_update_threads; ++i) { myargs[i].operation_extra = &uoe; myargs[i].operation = update_op; } Loading @@ -87,13 +98,13 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { } int num_seconds = random() % cli_args->time_of_test; run_workers(myargs, num_threads, num_seconds, true); run_workers(myargs, num_threads, num_seconds, true, cli_args); } int test_main(int argc, char *const argv[]) { struct cli_args args = DEFAULT_ARGS; args.checkpointing_period = 1; struct cli_args args = get_default_args(); args.env_args.checkpointing_period = 1; parse_stress_test_args(argc, argv, &args); if (args.do_test_and_crash) { stress_test_main(&args); Loading src/tests/recover-test_stress2.c +7 −5 Original line number Diff line number Diff line Loading @@ -22,21 +22,23 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { if (verbose) printf("starting creation of pthreads\n"); const int num_threads = cli_args->num_update_threads; struct arg myargs[num_threads]; for (int i = 0; i < num_threads; i++) { arg_init(&myargs[i], n, dbp, env, cli_args); struct update_op_args uoe = get_update_op_args(cli_args, NULL); // make the guy that updates the db for (int i = 0; i < 0 + cli_args->num_update_threads; ++i) { arg_init(&myargs[i], n, dbp, env, cli_args); myargs[i].operation_extra = &uoe; myargs[i].operation = update_op; } int num_seconds = random() % cli_args->time_of_test; run_workers(myargs, num_threads, num_seconds, true); run_workers(myargs, num_threads, num_seconds, true, cli_args); } int test_main(int argc, char *const argv[]) { struct cli_args args = DEFAULT_ARGS; args.checkpointing_period = 1; struct cli_args args = get_default_args(); args.env_args.checkpointing_period = 1; args.num_elements = 2000; parse_stress_test_args(argc, argv, &args); if (args.do_test_and_crash) { Loading src/tests/test_stress1.c +21 −10 Original line number Diff line number Diff line Loading @@ -55,29 +55,40 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { for (int i = 0; i < num_threads; i++) { arg_init(&myargs[i], n, dbp, env, cli_args); } struct scan_op_extra soe[4]; // make the forward fast scanner myargs[0].fast = TRUE; myargs[0].fwd = TRUE; soe[0].fast = TRUE; soe[0].fwd = TRUE; soe[0].prefetch = FALSE; myargs[0].operation_extra = &soe[0]; myargs[0].operation = scan_op; // make the forward slow scanner myargs[1].fast = FALSE; myargs[1].fwd = TRUE; soe[1].fast = FALSE; soe[1].fwd = TRUE; soe[1].prefetch = FALSE; myargs[1].operation_extra = &soe[1]; myargs[1].operation = scan_op; // make the backward fast scanner myargs[2].fast = TRUE; myargs[2].fwd = FALSE; soe[2].fast = TRUE; soe[2].fwd = FALSE; soe[2].prefetch = FALSE; myargs[2].operation_extra = &soe[2]; myargs[2].operation = scan_op; // make the backward slow scanner myargs[3].fast = FALSE; myargs[3].fwd = FALSE; soe[3].fast = FALSE; soe[3].fwd = FALSE; soe[3].prefetch = FALSE; myargs[3].operation_extra = &soe[3]; myargs[3].operation = scan_op; struct update_op_args uoe = get_update_op_args(cli_args, NULL); // make the guy that updates the db for (int i = 4; i < 4 + cli_args->num_update_threads; ++i) { myargs[i].operation_extra = &uoe; myargs[i].operation = update_op; } Loading @@ -86,12 +97,12 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { myargs[i].operation = ptquery_op; } run_workers(myargs, num_threads, cli_args->time_of_test, false); run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); } int test_main(int argc, char *const argv[]) { struct cli_args args = DEFAULT_ARGS; struct cli_args args = get_default_args(); parse_stress_test_args(argc, argv, &args); stress_test_main(&args); return 0; Loading src/tests/test_stress2.c +23 −12 Original line number Diff line number Diff line Loading @@ -49,45 +49,56 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { for (int i = 0; i < num_threads; i++) { arg_init(&myargs[i], n, dbp, env, cli_args); } struct scan_op_extra soe[4]; // make the forward fast scanner myargs[0].fast = TRUE; myargs[0].fwd = TRUE; soe[0].fast = TRUE; soe[0].fwd = TRUE; soe[0].prefetch = FALSE; myargs[0].operation_extra = &soe[0]; myargs[0].operation = scan_op; // make the forward slow scanner myargs[1].fast = FALSE; myargs[1].fwd = TRUE; soe[1].fast = FALSE; soe[1].fwd = TRUE; soe[1].prefetch = FALSE; myargs[1].operation_extra = &soe[1]; myargs[1].operation = scan_op; // make the backward fast scanner myargs[2].fast = TRUE; myargs[2].fwd = FALSE; soe[2].fast = TRUE; soe[2].fwd = FALSE; soe[2].prefetch = FALSE; myargs[2].operation_extra = &soe[2]; myargs[2].operation = scan_op; // make the backward slow scanner myargs[3].fast = FALSE; myargs[3].fwd = FALSE; soe[3].fast = FALSE; soe[3].fwd = FALSE; soe[3].prefetch = FALSE; myargs[3].operation_extra = &soe[3]; myargs[3].operation = scan_op; struct update_op_args uoe = get_update_op_args(cli_args, NULL); // make the guy that updates the db for (int i = 4; i < 4 + cli_args->num_update_threads; ++i) { myargs[i].bounded_update_range = false; myargs[i].operation_extra = &uoe; myargs[i].bounded_element_range = false; myargs[i].operation = update_op; } // make the guy that does point queries for (int i = 4 + cli_args->num_update_threads; i < num_threads; i++) { myargs[i].bounded_update_range = false; myargs[i].bounded_element_range = false; myargs[i].operation = ptquery_op_no_check; } run_workers(myargs, num_threads, cli_args->time_of_test, false); run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); } int test_main(int argc, char *const argv[]) { struct cli_args args = DEFAULT_ARGS; struct cli_args args = get_default_args(); parse_stress_test_args(argc, argv, &args); stress_test_main(&args); return 0; Loading Loading
src/tests/recover-test_crash_in_flusher_thread.h +5 −3 Original line number Diff line number Diff line Loading @@ -63,21 +63,23 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { } // make the guy that updates the db struct update_op_args uoe = get_update_op_args(cli_args, NULL); myargs[0].operation_extra = &uoe; myargs[0].operation = update_op; //myargs[0].update_pad_frequency = 0; db_env_set_flusher_thread_callback(ft_callback, env); run_workers(myargs, num_threads, cli_args->time_of_test, true); run_workers(myargs, num_threads, cli_args->time_of_test, true, cli_args); } static int run_recover_ft_test(int argc, char *const argv[]) { struct cli_args args = DEFAULT_ARGS; struct cli_args args = get_default_args(); // make test time arbitrarily high because we expect a crash args.time_of_test = 1000000000; args.num_elements = 2000; // we want to induce a checkpoint args.checkpointing_period = 0; args.env_args.checkpointing_period = 0; parse_stress_test_args(argc, argv, &args); if (args.do_test_and_crash) { stress_test_main(&args); Loading
src/tests/recover-test_stress1.c +22 −11 Original line number Diff line number Diff line Loading @@ -55,29 +55,40 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { for (int i = 0; i < num_threads; i++) { arg_init(&myargs[i], n, dbp, env, cli_args); } struct scan_op_extra soe[4]; // make the forward fast scanner myargs[0].fast = TRUE; myargs[0].fwd = TRUE; soe[0].fast = TRUE; soe[0].fwd = TRUE; soe[0].prefetch = FALSE; myargs[0].operation_extra = &soe[0]; myargs[0].operation = scan_op; // make the forward slow scanner myargs[1].fast = FALSE; myargs[1].fwd = TRUE; soe[1].fast = FALSE; soe[1].fwd = TRUE; soe[1].prefetch = FALSE; myargs[1].operation_extra = &soe[1]; myargs[1].operation = scan_op; // make the backward fast scanner myargs[2].fast = TRUE; myargs[2].fwd = FALSE; soe[2].fast = TRUE; soe[2].fwd = FALSE; soe[2].prefetch = FALSE; myargs[2].operation_extra = &soe[2]; myargs[2].operation = scan_op; // make the backward slow scanner myargs[3].fast = FALSE; myargs[3].fwd = FALSE; soe[3].fast = FALSE; soe[3].fwd = FALSE; soe[3].prefetch = FALSE; myargs[3].operation_extra = &soe[3]; myargs[3].operation = scan_op; struct update_op_args uoe = get_update_op_args(cli_args, NULL); // make the guy that updates the db for (int i = 4; i < 4 + cli_args->num_update_threads; ++i) { myargs[i].operation_extra = &uoe; myargs[i].operation = update_op; } Loading @@ -87,13 +98,13 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { } int num_seconds = random() % cli_args->time_of_test; run_workers(myargs, num_threads, num_seconds, true); run_workers(myargs, num_threads, num_seconds, true, cli_args); } int test_main(int argc, char *const argv[]) { struct cli_args args = DEFAULT_ARGS; args.checkpointing_period = 1; struct cli_args args = get_default_args(); args.env_args.checkpointing_period = 1; parse_stress_test_args(argc, argv, &args); if (args.do_test_and_crash) { stress_test_main(&args); Loading
src/tests/recover-test_stress2.c +7 −5 Original line number Diff line number Diff line Loading @@ -22,21 +22,23 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { if (verbose) printf("starting creation of pthreads\n"); const int num_threads = cli_args->num_update_threads; struct arg myargs[num_threads]; for (int i = 0; i < num_threads; i++) { arg_init(&myargs[i], n, dbp, env, cli_args); struct update_op_args uoe = get_update_op_args(cli_args, NULL); // make the guy that updates the db for (int i = 0; i < 0 + cli_args->num_update_threads; ++i) { arg_init(&myargs[i], n, dbp, env, cli_args); myargs[i].operation_extra = &uoe; myargs[i].operation = update_op; } int num_seconds = random() % cli_args->time_of_test; run_workers(myargs, num_threads, num_seconds, true); run_workers(myargs, num_threads, num_seconds, true, cli_args); } int test_main(int argc, char *const argv[]) { struct cli_args args = DEFAULT_ARGS; args.checkpointing_period = 1; struct cli_args args = get_default_args(); args.env_args.checkpointing_period = 1; args.num_elements = 2000; parse_stress_test_args(argc, argv, &args); if (args.do_test_and_crash) { Loading
src/tests/test_stress1.c +21 −10 Original line number Diff line number Diff line Loading @@ -55,29 +55,40 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { for (int i = 0; i < num_threads; i++) { arg_init(&myargs[i], n, dbp, env, cli_args); } struct scan_op_extra soe[4]; // make the forward fast scanner myargs[0].fast = TRUE; myargs[0].fwd = TRUE; soe[0].fast = TRUE; soe[0].fwd = TRUE; soe[0].prefetch = FALSE; myargs[0].operation_extra = &soe[0]; myargs[0].operation = scan_op; // make the forward slow scanner myargs[1].fast = FALSE; myargs[1].fwd = TRUE; soe[1].fast = FALSE; soe[1].fwd = TRUE; soe[1].prefetch = FALSE; myargs[1].operation_extra = &soe[1]; myargs[1].operation = scan_op; // make the backward fast scanner myargs[2].fast = TRUE; myargs[2].fwd = FALSE; soe[2].fast = TRUE; soe[2].fwd = FALSE; soe[2].prefetch = FALSE; myargs[2].operation_extra = &soe[2]; myargs[2].operation = scan_op; // make the backward slow scanner myargs[3].fast = FALSE; myargs[3].fwd = FALSE; soe[3].fast = FALSE; soe[3].fwd = FALSE; soe[3].prefetch = FALSE; myargs[3].operation_extra = &soe[3]; myargs[3].operation = scan_op; struct update_op_args uoe = get_update_op_args(cli_args, NULL); // make the guy that updates the db for (int i = 4; i < 4 + cli_args->num_update_threads; ++i) { myargs[i].operation_extra = &uoe; myargs[i].operation = update_op; } Loading @@ -86,12 +97,12 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { myargs[i].operation = ptquery_op; } run_workers(myargs, num_threads, cli_args->time_of_test, false); run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); } int test_main(int argc, char *const argv[]) { struct cli_args args = DEFAULT_ARGS; struct cli_args args = get_default_args(); parse_stress_test_args(argc, argv, &args); stress_test_main(&args); return 0; Loading
src/tests/test_stress2.c +23 −12 Original line number Diff line number Diff line Loading @@ -49,45 +49,56 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) { for (int i = 0; i < num_threads; i++) { arg_init(&myargs[i], n, dbp, env, cli_args); } struct scan_op_extra soe[4]; // make the forward fast scanner myargs[0].fast = TRUE; myargs[0].fwd = TRUE; soe[0].fast = TRUE; soe[0].fwd = TRUE; soe[0].prefetch = FALSE; myargs[0].operation_extra = &soe[0]; myargs[0].operation = scan_op; // make the forward slow scanner myargs[1].fast = FALSE; myargs[1].fwd = TRUE; soe[1].fast = FALSE; soe[1].fwd = TRUE; soe[1].prefetch = FALSE; myargs[1].operation_extra = &soe[1]; myargs[1].operation = scan_op; // make the backward fast scanner myargs[2].fast = TRUE; myargs[2].fwd = FALSE; soe[2].fast = TRUE; soe[2].fwd = FALSE; soe[2].prefetch = FALSE; myargs[2].operation_extra = &soe[2]; myargs[2].operation = scan_op; // make the backward slow scanner myargs[3].fast = FALSE; myargs[3].fwd = FALSE; soe[3].fast = FALSE; soe[3].fwd = FALSE; soe[3].prefetch = FALSE; myargs[3].operation_extra = &soe[3]; myargs[3].operation = scan_op; struct update_op_args uoe = get_update_op_args(cli_args, NULL); // make the guy that updates the db for (int i = 4; i < 4 + cli_args->num_update_threads; ++i) { myargs[i].bounded_update_range = false; myargs[i].operation_extra = &uoe; myargs[i].bounded_element_range = false; myargs[i].operation = update_op; } // make the guy that does point queries for (int i = 4 + cli_args->num_update_threads; i < num_threads; i++) { myargs[i].bounded_update_range = false; myargs[i].bounded_element_range = false; myargs[i].operation = ptquery_op_no_check; } run_workers(myargs, num_threads, cli_args->time_of_test, false); run_workers(myargs, num_threads, cli_args->time_of_test, false, cli_args); } int test_main(int argc, char *const argv[]) { struct cli_args args = DEFAULT_ARGS; struct cli_args args = get_default_args(); parse_stress_test_args(argc, argv, &args); stress_test_main(&args); return 0; Loading