rename tulog.h ulog.h
This commit is contained in:
parent
f50bd07c8d
commit
8ccd079f6e
|
@ -20,9 +20,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define TAOS_DEF_ERROR_CODE(mod, code) ((int32_t)((0x80000000 | ((mod)<<16) | (code))))
|
||||
|
||||
#define TAOS_SYSTEM_ERROR(code) (0x80ff0000 | (code))
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "taosdef.h"
|
||||
#include "taoserror.h"
|
||||
#include "tdataformat.h"
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "taosdef.h"
|
||||
|
||||
// this data type is internally used only in 'in' query to hold the values
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct SRpcEpSet;
|
||||
struct SRpcMsg;
|
||||
struct Dnode;
|
||||
|
||||
/**
|
||||
* Initialize and start the dnode module.
|
||||
*
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
#ifndef _TD_UTIL_DEF_H
|
||||
#define _TD_UTIL_DEF_H
|
||||
|
||||
#include "os.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "tdataformat.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "talgo.h"
|
||||
#include "tcoding.h"
|
||||
#include "wchar.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "os.h"
|
||||
#include "taosdef.h"
|
||||
#include "taoserror.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "tlog.h"
|
||||
#include "tconfig.h"
|
||||
#include "tglobal.h"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "os.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "tglobal.h"
|
||||
#include "tconfig.h"
|
||||
#include "tutil.h"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "os.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "tglobal.h"
|
||||
#include "tconfig.h"
|
||||
#include "tutil.h"
|
||||
|
|
|
@ -13,11 +13,22 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "os.h"
|
||||
#include "tulog.h"
|
||||
#include "trpc.h"
|
||||
#include "ulog.h"
|
||||
#include "dnode.h"
|
||||
|
||||
static bool stop = false;
|
||||
static void sigintHandler(int32_t signum, void *info, void *ctx) { stop = true; }
|
||||
static void setSignalHandler() {
|
||||
taosSetSignal(SIGTERM, sigintHandler);
|
||||
taosSetSignal(SIGHUP, sigintHandler);
|
||||
taosSetSignal(SIGINT, sigintHandler);
|
||||
taosSetSignal(SIGABRT, sigintHandler);
|
||||
taosSetSignal(SIGBREAK, sigintHandler);
|
||||
}
|
||||
|
||||
int main(int argc, char const *argv[]) {
|
||||
setSignalHandler();
|
||||
|
||||
struct Dnode *dnode = dnodeCreateInstance();
|
||||
if (dnode == NULL) {
|
||||
uInfo("Failed to start TDengine, please check the log at:%s", tsLogDir);
|
||||
|
@ -26,12 +37,12 @@ int main(int argc, char const *argv[]) {
|
|||
|
||||
uInfo("Started TDengine service successfully.");
|
||||
|
||||
// if (tsem_wait(&exitSem) != 0) {
|
||||
// syslog(LOG_ERR, "failed to wait exit semphore: %s", strerror(errno));
|
||||
// }
|
||||
|
||||
dnodeDropInstance(dnode);
|
||||
while (!stop) {
|
||||
taosMsleep(100);
|
||||
}
|
||||
|
||||
uInfo("TDengine is shut down!");
|
||||
dnodeDropInstance(dnode);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include "os.h"
|
||||
#include "hash.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "tdef.h"
|
||||
|
||||
#define EXT_SIZE 1024
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "os.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "ttimer.h"
|
||||
#include "tutil.h"
|
||||
#include "tcache.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#define _DEFAULT_SOURCE
|
||||
|
||||
#include "tcompare.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "hash.h"
|
||||
#include "regex.h"
|
||||
#include "os.h"
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
#include "td_sz.h"
|
||||
#endif
|
||||
#include "tscompression.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
|
||||
static const int TEST_NUMBER = 1;
|
||||
#define is_bigendian() ((*(char *)&TEST_NUMBER) == 0)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#define _DEFAULT_SOURCE
|
||||
#include "os.h"
|
||||
#include "tconfig.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "tutil.h"
|
||||
|
||||
SGlobalCfg tsGlobalConfig[TSDB_CFG_MAX_NUM] = {{0}};
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#define _DEFAULT_SOURCE
|
||||
#include "os.h"
|
||||
#include "taoserror.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "tutil.h"
|
||||
#include "tref.h"
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
|
||||
#include "os.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
|
||||
typedef struct {
|
||||
int maxId;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "os.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "tlog.h"
|
||||
#include "tnote.h"
|
||||
#include "tutil.h"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include "os.h"
|
||||
#include "tlosertree.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
|
||||
// set initial value for loser tree
|
||||
void tLoserTreeInit(SLoserTreeInfo* pTree) {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
|
||||
#include "os.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "tmempool.h"
|
||||
#include "tutil.h"
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
|
||||
#include "os.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "taoserror.h"
|
||||
#include "tqueue.h"
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include "os.h"
|
||||
#include "taoserror.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "tutil.h"
|
||||
|
||||
#define TSDB_REF_OBJECTS 50
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "os.h"
|
||||
#include "tdef.h"
|
||||
#include "tutil.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "tsched.h"
|
||||
#include "ttimer.h"
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "tskiplist.h"
|
||||
#include "os.h"
|
||||
#include "tcompare.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "tutil.h"
|
||||
|
||||
static int initForwardBackwardPtr(SSkipList *pSkipList);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "os.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "tstep.h"
|
||||
|
||||
SSteps *taosStepInit(int32_t maxsize) {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "tthread.h"
|
||||
#include "tdef.h"
|
||||
#include "tutil.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "taoserror.h"
|
||||
|
||||
// create new thread
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "tcrc32c.h"
|
||||
#include "tdef.h"
|
||||
#include "tutil.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "taoserror.h"
|
||||
|
||||
int32_t strdequote(char *z) {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "os.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
#include "tqueue.h"
|
||||
#include "tworker.h"
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "tlog.h"
|
||||
#include "tglobal.h"
|
||||
#include "taoserror.h"
|
||||
#include "tulog.h"
|
||||
#include "ulog.h"
|
||||
|
||||
typedef struct {
|
||||
int refNum;
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
|
||||
*
|
||||
* This program is free software: you can use, redistribute, and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3
|
||||
* or later ("AGPL"), as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TDENGINE_MODULE
|
||||
#define TDENGINE_MODULE
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t moduleStart();
|
||||
void moduleStop();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,95 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
|
||||
*
|
||||
* This program is free software: you can use, redistribute, and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3
|
||||
* or later ("AGPL"), as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TDENGINE_VNODE_H
|
||||
#define TDENGINE_VNODE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "trpc.h"
|
||||
#include "twal.h"
|
||||
|
||||
typedef struct {
|
||||
int32_t len;
|
||||
void * rsp;
|
||||
void * qhandle; // used by query and retrieve msg
|
||||
} SRspRet;
|
||||
|
||||
typedef struct {
|
||||
int32_t code;
|
||||
int32_t contLen;
|
||||
void * rpcHandle;
|
||||
void * rpcAhandle;
|
||||
void * qhandle;
|
||||
void * pVnode;
|
||||
int8_t qtype;
|
||||
int8_t msgType;
|
||||
SRspRet rspRet;
|
||||
char pCont[];
|
||||
} SVReadMsg;
|
||||
|
||||
typedef struct {
|
||||
int32_t code;
|
||||
int32_t processedCount;
|
||||
int32_t qtype;
|
||||
void * pVnode;
|
||||
SRpcMsg rpcMsg;
|
||||
SRspRet rspRet;
|
||||
char reserveForSync[24];
|
||||
SWalHead walHead;
|
||||
} SVWriteMsg;
|
||||
|
||||
// vnodeStatus
|
||||
extern char *vnodeStatus[];
|
||||
|
||||
// vnodeMain
|
||||
int32_t vnodeCreate(SCreateVnodeMsg *pVnodeCfg);
|
||||
int32_t vnodeDrop(int32_t vgId);
|
||||
int32_t vnodeOpen(int32_t vgId);
|
||||
int32_t vnodeAlter(void *pVnode, SCreateVnodeMsg *pVnodeCfg);
|
||||
int32_t vnodeSync(int32_t vgId);
|
||||
int32_t vnodeClose(int32_t vgId);
|
||||
int32_t vnodeCompact(int32_t vgId);
|
||||
|
||||
// vnodeMgmt
|
||||
int32_t vnodeInitMgmt();
|
||||
void vnodeCleanupMgmt();
|
||||
void* vnodeAcquire(int32_t vgId);
|
||||
void vnodeRelease(void *pVnode);
|
||||
void* vnodeAcquireNotClose(int32_t vgId);
|
||||
void* vnodeGetWal(void *pVnode);
|
||||
int32_t vnodeGetVnodeList(int32_t vnodeList[], int32_t *numOfVnodes);
|
||||
void vnodeBuildStatusMsg(void *pStatus);
|
||||
void vnodeSetAccess(SVgroupAccess *pAccess, int32_t numOfVnodes);
|
||||
|
||||
// vnodeWrite
|
||||
int32_t vnodeWriteToWQueue(void *pVnode, void *pHead, int32_t qtype, void *pRpcMsg);
|
||||
void vnodeFreeFromWQueue(void *pVnode, SVWriteMsg *pWrite);
|
||||
int32_t vnodeProcessWrite(void *pVnode, void *pHead, int32_t qtype, void *pRspRet);
|
||||
|
||||
// vnodeSync
|
||||
void vnodeConfirmForward(void *pVnode, uint64_t version, int32_t code, bool force);
|
||||
|
||||
// vnodeRead
|
||||
int32_t vnodeWriteToRQueue(void *pVnode, void *pCont, int32_t contLen, int8_t qtype, void *rparam);
|
||||
void vnodeFreeFromRQueue(void *pVnode, SVReadMsg *pRead);
|
||||
int32_t vnodeProcessRead(void *pVnode, SVReadMsg *pRead);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue