Commit f0e30c67 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:4384], add tests

git-svn-id: file:///svn/toku/tokudb@38727 c7de825b-a66e-492c-adef-691d508d4ae1
parent a7dc3c1b
......@@ -27,6 +27,8 @@ void toku_brt_flusher_get_status(BRT_FLUSHER_STATUS status) {
#define ft_flush_before_merge 6
#define ft_flush_after_merge 7
#define ft_flush_after_rebalance 8
#define ft_flush_before_unpin_remove 9
#define ft_flush_before_pin_second_node_for_merge 10
//
// For test purposes only.
......@@ -1323,6 +1325,8 @@ brt_merge_child(
fill_bfe_for_full_read(&bfe, h);
toku_pin_brtnode_off_client_thread(h, BP_BLOCKNUM(node, childnuma), childfullhash, &bfe, 1, &node, &childa);
}
// for test
call_flusher_thread_callback(ft_flush_before_pin_second_node_for_merge);
{
BRTNODE dep_nodes[2];
dep_nodes[0] = node;
......@@ -1385,6 +1389,9 @@ brt_merge_child(
//
if (did_merge) {
BLOCKNUM bn = childb->thisnodename;
// for test
call_flusher_thread_callback(ft_flush_before_unpin_remove);
// merge_remove_key_callback will free the blocknum
int rrb = toku_cachetable_unpin_and_remove(
h->cf,
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#ident "$Id: recover-ft8.c 38549 2012-01-06 17:49:29Z leifwalsh $"
#include "test.h"
#include <stdio.h>
#include <stdlib.h>
#include <toku_pthread.h>
#include <unistd.h>
#include <memory.h>
#include <sys/stat.h>
#include <db.h>
#include "threaded_stress_test_helpers.h"
#include "recover-test_crash_in_flusher_thread.h"
int
test_main(int argc, char *const argv[]) {
state_to_crash = 10;
return run_recover_ft_test(argc, argv);
}
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#ident "$Id: recover-ft8.c 38549 2012-01-06 17:49:29Z leifwalsh $"
#include "test.h"
#include <stdio.h>
#include <stdlib.h>
#include <toku_pthread.h>
#include <unistd.h>
#include <memory.h>
#include <sys/stat.h>
#include <db.h>
#include "threaded_stress_test_helpers.h"
#include "recover-test_crash_in_flusher_thread.h"
int
test_main(int argc, char *const argv[]) {
state_to_crash = 9;
return run_recover_ft_test(argc, argv);
}
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