From 2b82563669c6e02393da629b6cc03fb551a78fd7 Mon Sep 17 00:00:00 2001 From: Zardosht Kasheff Date: Tue, 16 Apr 2013 23:59:43 -0400 Subject: [PATCH] [t:3737], set curr_dsn when deserializing a header git-svn-id: file:///svn/toku/tokudb@32902 c7de825b-a66e-492c-adef-691d508d4ae1 --- newbrt/brt-serialize.c | 1 + newbrt/brt.c | 1 + 2 files changed, 2 insertions(+) diff --git a/newbrt/brt-serialize.c b/newbrt/brt-serialize.c index 296e258d29a..a7472f06d0d 100644 --- a/newbrt/brt-serialize.c +++ b/newbrt/brt-serialize.c @@ -1681,6 +1681,7 @@ deserialize_brtheader (int fd, struct rbuf *rb, struct brt_header **brth) { h->dirty=0; h->panic = 0; h->panic_string = 0; + h->curr_dsn = MIN_DSN+1; toku_list_init(&h->live_brts); toku_list_init(&h->zombie_brts); toku_list_init(&h->checkpoint_before_commit_link); diff --git a/newbrt/brt.c b/newbrt/brt.c index 83d05309421..0f6d4b17849 100644 --- a/newbrt/brt.c +++ b/newbrt/brt.c @@ -149,6 +149,7 @@ toku_assert_entire_node_in_memory(BRTNODE node) { // static void set_new_DSN_for_node(BRTNODE node, BRT t) { + assert(t->h->curr_dsn > MIN_DSN); node->dsn = t->h->curr_dsn; t->h->curr_dsn++; }