From 19a9b244b3167ba01c0759a846036cab7261d08e Mon Sep 17 00:00:00 2001 From: kanoi Date: Fri, 16 Jan 2015 14:32:27 +1100 Subject: [PATCH] ckdb - log steps in the storage dealloc during shutdown --- src/ckdb.c | 16 ++++++++++++++++ src/ckdb.h | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/ckdb.c b/src/ckdb.c index 91bb3fdc..3b9858a2 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -1117,6 +1117,8 @@ static void alloc_storage() static void dealloc_storage() { + LOGWARNING("%s() logqueue ...", __func__); + FREE_LISTS(logqueue); FREE_TREE(marks); @@ -1128,6 +1130,8 @@ static void dealloc_storage() FREE_STORE_DATA(workmarkers); FREE_LIST_DATA(workmarkers); + LOGWARNING("%s() markersummary ...", __func__); + FREE_TREE(markersummary_userid); FREE_TREE(markersummary); FREE_STORE_DATA(markersummary); @@ -1135,6 +1139,8 @@ static void dealloc_storage() FREE_ALL(workerstatus); + LOGWARNING("%s() userstats ...", __func__); + FREE_TREE(userstats_workerstatus); FREE_TREE(userstats_statsdate); if (userstats_summ) @@ -1142,11 +1148,15 @@ static void dealloc_storage() FREE_STORE(userstats_eos); FREE_ALL(userstats); + LOGWARNING("%s() poolstats ...", __func__); + FREE_ALL(poolstats); FREE_ALL(auths); FREE_ALL(miningpayouts); FREE_ALL(blocks); + LOGWARNING("%s() sharesummary ...", __func__); + FREE_TREE(sharesummary_workinfoid); FREE_TREE(sharesummary); FREE_STORE_DATA(sharesummary); @@ -1155,6 +1165,8 @@ static void dealloc_storage() FREE_ALL(shareerrors); FREE_ALL(shares); + LOGWARNING("%s() workinfo ...", __func__); + FREE_TREE(workinfo_height); FREE_TREE(workinfo); FREE_STORE_DATA(workinfo); @@ -1174,9 +1186,13 @@ static void dealloc_storage() FREE_TREE(userid); FREE_ALL(users); + LOGWARNING("%s() transfer/heartbeatqueue/workqueue ...", __func__); + FREE_LIST(transfer); FREE_LISTS(heartbeatqueue); FREE_LISTS(workqueue); + + LOGWARNING("%s() finished", __func__); } static bool setup_data() diff --git a/src/ckdb.h b/src/ckdb.h index b0733d55..443c32c6 100644 --- a/src/ckdb.h +++ b/src/ckdb.h @@ -52,7 +52,7 @@ #define DB_VLOCK "1" #define DB_VERSION "0.9.6" -#define CKDB_VERSION DB_VERSION"-0.832" +#define CKDB_VERSION DB_VERSION"-0.833" #define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL_HERE __FILE__, __func__, __LINE__