提交 e7bd0ca7 编写于 作者: H Hui Li

[TD-662]

上级 bb8a92e8
......@@ -21,7 +21,6 @@ extern "C" {
#endif
int32_t dnodeInitCheck();
void dnodeStartCheck();
void dnodeCleanupCheck();
#ifdef __cplusplus
......
......@@ -14,12 +14,6 @@
*/
#define _DEFAULT_SOURCE
#include <stdio.h>
#include <sys/statfs.h>
#include <sys/vfs.h>
#include <sys/sysinfo.h>
#include <errno.h>
#include "os.h"
#include "taosdef.h"
#include "tglobal.h"
......@@ -59,7 +53,6 @@ static int bindTcpPort(int port) {
return -1;
}
if (listen(serverSocket, 5) < 0) {
dError("port:%d listen() fail: %s", port, strerror(errno));
close(serverSocket);
......@@ -101,10 +94,12 @@ static int dnodeCheckNetwork() {
for (int port = startPort; port < startPort + 12; port++) {
ret = bindTcpPort(port);
if (0 != ret) {
dError("failed to tcp bind port %d, quit", port);
return -1;
}
ret = bindUdpPort(port);
if (0 != ret) {
dError("failed to udp bind port %d, quit", port);
return -1;
}
}
......@@ -258,10 +253,6 @@ int32_t dnodeInitCheck() {
}
}
return 0;
}
void dnodeStartCheck() {
for (ECheckItemType index = 0; index < TSDB_CHECK_ITEM_MAX; ++index) {
if (tsCheckItem[index].enable && tsCheckItem[index].startFp) {
if ((*tsCheckItem[index].startFp)() != 0) {
......@@ -270,6 +261,9 @@ void dnodeStartCheck() {
}
}
}
return 0;
}
......@@ -49,6 +49,7 @@ typedef struct {
} SDnodeComponent;
static const SDnodeComponent tsDnodeComponents[] = {
{"check", dnodeInitCheck, dnodeCleanupCheck}, // NOTES: dnodeInitCheck must be first component !!!
{"storage", dnodeInitStorage, dnodeCleanupStorage},
{"vread", dnodeInitVnodeRead, dnodeCleanupVnodeRead},
{"vwrite", dnodeInitVnodeWrite, dnodeCleanupVnodeWrite},
......@@ -62,7 +63,6 @@ static const SDnodeComponent tsDnodeComponents[] = {
{"mgmt-tmr", dnodeInitMgmtTimer, dnodeCleanupMgmtTimer},
{"shell", dnodeInitShell, dnodeCleanupShell},
{"telemetry", dnodeInitTelemetry, dnodeCleanupTelemetry},
{"check", dnodeInitCheck, dnodeCleanupCheck},
};
static int dnodeCreateDir(const char *dir) {
......@@ -125,7 +125,6 @@ int32_t dnodeInitSystem() {
return -1;
}
dnodeStartCheck();
dnodeStartModules();
dnodeSetRunStatus(TSDB_DNODE_RUN_STATUS_RUNING);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册