提交 9c96634b 编写于 作者: S Shengliang Guan

un-init variables

上级 3a2d7bc0
...@@ -106,6 +106,12 @@ int32_t dnodeInitMgmt() { ...@@ -106,6 +106,12 @@ int32_t dnodeInitMgmt() {
} }
} }
int32_t code = vnodeInitResources();
if (code != TSDB_CODE_SUCCESS) {
dnodeCleanupMgmt();
return -1;
}
// create the queue and thread to handle the message // create the queue and thread to handle the message
tsMgmtQset = taosOpenQset(); tsMgmtQset = taosOpenQset();
if (tsMgmtQset == NULL) { if (tsMgmtQset == NULL) {
...@@ -127,7 +133,7 @@ int32_t dnodeInitMgmt() { ...@@ -127,7 +133,7 @@ int32_t dnodeInitMgmt() {
pthread_attr_init(&thAttr); pthread_attr_init(&thAttr);
pthread_attr_setdetachstate(&thAttr, PTHREAD_CREATE_JOINABLE); pthread_attr_setdetachstate(&thAttr, PTHREAD_CREATE_JOINABLE);
int32_t code = pthread_create(&tsQthread, &thAttr, dnodeProcessMgmtQueue, NULL); code = pthread_create(&tsQthread, &thAttr, dnodeProcessMgmtQueue, NULL);
pthread_attr_destroy(&thAttr); pthread_attr_destroy(&thAttr);
if (code != 0) { if (code != 0) {
dError("failed to create thread to process mgmt queue, reason:%s", strerror(errno)); dError("failed to create thread to process mgmt queue, reason:%s", strerror(errno));
...@@ -135,12 +141,6 @@ int32_t dnodeInitMgmt() { ...@@ -135,12 +141,6 @@ int32_t dnodeInitMgmt() {
return -1; return -1;
} }
code = vnodeInitResources();
if (code != TSDB_CODE_SUCCESS) {
dnodeCleanupMgmt();
return -1;
}
code = dnodeOpenVnodes(); code = dnodeOpenVnodes();
if (code != TSDB_CODE_SUCCESS) { if (code != TSDB_CODE_SUCCESS) {
dnodeCleanupMgmt(); dnodeCleanupMgmt();
...@@ -364,7 +364,7 @@ void dnodeStartStream() { ...@@ -364,7 +364,7 @@ void dnodeStartStream() {
static void dnodeCloseVnodes() { static void dnodeCloseVnodes() {
int32_t vnodeList[TSDB_MAX_VNODES]= {0}; int32_t vnodeList[TSDB_MAX_VNODES]= {0};
int32_t numOfVnodes; int32_t numOfVnodes = 0;
int32_t status; int32_t status;
status = vnodeGetVnodeList(vnodeList, &numOfVnodes); status = vnodeGetVnodeList(vnodeList, &numOfVnodes);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册