From dfe83a215d2a443ca7f9d7a7570bc133a99da6d9 Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Wed, 9 Dec 2009 19:56:19 +0000 Subject: [PATCH] reorder initialization code so that the i/o backend stuff happens all at once --- src/stasis/transactional2.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/stasis/transactional2.c b/src/stasis/transactional2.c index 7007142..0d59291 100644 --- a/src/stasis/transactional2.c +++ b/src/stasis/transactional2.c @@ -68,6 +68,13 @@ int Tinit() { stasis_operation_table_init(); + stasis_transaction_table = stasis_transaction_table_init(); + stasis_dirty_page_table = stasis_dirty_page_table_init(); + + stasis_page_init(stasis_dirty_page_table); + + // XXX move into stasis_log_safe_writes_factory() + stasis_log_file = 0; if(LOG_TO_FILE == stasis_log_type) { @@ -84,11 +91,6 @@ int Tinit() { assert(stasis_log_file != NULL); } - stasis_transaction_table = stasis_transaction_table_init(); - stasis_dirty_page_table = stasis_dirty_page_table_init(); - - stasis_page_init(stasis_dirty_page_table); - stasis_buffer_manager = stasis_buffer_manager_factory(stasis_log_file, stasis_dirty_page_table); stasis_dirty_page_table_set_buffer_manager(stasis_dirty_page_table, stasis_buffer_manager); // xxx circular dependency.