未验证 提交 34b6f894 编写于 作者: S slguan 提交者: GitHub

Merge pull request #1833 from taosdata/hotfix/forcestop

data in wal may not be written to system successfylly during initiali…
......@@ -116,7 +116,7 @@ static int32_t dnodeOpenVnodes() {
free(vnodeList);
dPrint("there are total vnodes:%d, failed to open:%d", numOfVnodes, failed);
dPrint("there are total vnodes:%d, openned:%d failed:%d", numOfVnodes, numOfVnodes-failed, failed);
return TSDB_CODE_SUCCESS;
}
......
......@@ -188,7 +188,7 @@ static void taosAcceptTcpConnection(void *arg) {
sockFd = taosOpenTcpServerSocket(pServerObj->ip, pServerObj->port);
if (sockFd < 0) return;
tTrace("%s TCP server is ready, ip:%s:%hu", pServerObj->label, pServerObj->ip, pServerObj->port);
tTrace("%s TCP server is ready, ip:0x%x:%hu", pServerObj->label, pServerObj->ip, pServerObj->port);
while (1) {
socklen_t addrlen = sizeof(caddr);
......
......@@ -51,7 +51,7 @@ int32_t vnodeProcessWrite(void *param1, int qtype, void *param2, void *item) {
if (vnodeProcessWriteMsgFp[pHead->msgType] == NULL)
return TSDB_CODE_MSG_NOT_PROCESSED;
if (pVnode->status != TAOS_VN_STATUS_READY)
if (pVnode->status != TAOS_VN_STATUS_READY && qtype == TAOS_QTYPE_RPC)
return TSDB_CODE_NOT_ACTIVE_VNODE;
if (pHead->version == 0) { // from client
......
......@@ -79,7 +79,9 @@ void *walOpen(const char *path, const SWalCfg *pCfg) {
pthread_mutex_destroy(&pWal->mutex);
free(pWal);
pWal = NULL;
}
} else {
wTrace("wal:%s, it is open, level:%d", path, pWal->level);
}
return pWal;
}
......@@ -177,8 +179,11 @@ void walFsync(void *handle) {
SWal *pWal = handle;
if (pWal->level == TAOS_WAL_FSYNC)
fsync(pWal->fd);
if (pWal->level == TAOS_WAL_FSYNC && pWal->fd >=0) {
if (fsync(pWal->fd) < 0) {
wError("wal:%s, fsync failed(%s)", pWal->name, strerror(errno));
}
}
}
int walRestore(void *handle, void *pVnode, int (*writeFp)(void *, void *, int)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册