Commit 28428074 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Log the pivots correctly. Addresses #27.

git-svn-id: file:///svn/tokudb@1822 c7de825b-a66e-492c-adef-691d508d4ae1
parent e5f752c3
...@@ -1614,9 +1614,8 @@ static int brt_init_new_root(BRT brt, BRTNODE nodea, BRTNODE nodeb, DBT splitk, ...@@ -1614,9 +1614,8 @@ static int brt_init_new_root(BRT brt, BRTNODE nodea, BRTNODE nodeb, DBT splitk,
fixup_child_fingerprint(newroot, 0, nodea, brt, txn); fixup_child_fingerprint(newroot, 0, nodea, brt, txn);
fixup_child_fingerprint(newroot, 1, nodeb, brt, txn); fixup_child_fingerprint(newroot, 1, nodeb, brt, txn);
{ {
BYTESTRING bs; BYTESTRING bs = { .len = kv_pair_keylen(newroot->u.n.childkeys[0]),
bs.len = splitk.size; .data = kv_pair_key(newroot->u.n.childkeys[0]) };
bs.data = splitk.data;
r=toku_log_setpivot(txn, toku_txn_get_txnid(txn), toku_cachefile_filenum(brt->cf), newroot_diskoff, 0, bs); r=toku_log_setpivot(txn, toku_txn_get_txnid(txn), toku_cachefile_filenum(brt->cf), newroot_diskoff, 0, bs);
if (r!=0) return r; if (r!=0) return r;
} }
......
...@@ -187,3 +187,6 @@ test_db_assoc3.tdbrun: test_db_assoc3.tdb ...@@ -187,3 +187,6 @@ test_db_assoc3.tdbrun: test_db_assoc3.tdb
test_db_assoc3.bdbrun: test_db_assoc3.bdb test_db_assoc3.bdbrun: test_db_assoc3.bdb
$(MAYBEATSIGN) $(VGRIND) ./test_db_assoc3.bdb --seed=2 --count=100000 $(VERBVERBOSE) $(MAYBEATSIGN) $(VGRIND) ./test_db_assoc3.bdb --seed=2 --count=100000 $(VERBVERBOSE)
$(MAYBEATSIGN) $(VGRIND) ./test_db_assoc3.bdb --seed=2 --count=100000 --more $(VERBVERBOSE) $(MAYBEATSIGN) $(VGRIND) ./test_db_assoc3.bdb --seed=2 --count=100000 --more $(VERBVERBOSE)
dumpit:
../../newbrt/brtdump dir.test_log5.c.tdb.recover/foo.db > dump.r && ../../newbrt/brtdump dir.test_log5.c.tdb/foo.db > dump.o && diff dump.o dump.r
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