chore: set default value of tsStartUdfd false on windows

This commit is contained in:
kailixu 2023-08-16 09:55:30 +08:00
parent ccce04ceb9
commit b54d6e2982
6 changed files with 5 additions and 11 deletions

View File

@ -216,7 +216,11 @@ uint32_t tsCurRange = 100; // range
char tsCompressor[32] = "ZSTD_COMPRESSOR"; // ZSTD_COMPRESSOR or GZIP_COMPRESSOR char tsCompressor[32] = "ZSTD_COMPRESSOR"; // ZSTD_COMPRESSOR or GZIP_COMPRESSOR
// udf // udf
#ifdef WINDOWS
bool tsStartUdfd = false;
#else
bool tsStartUdfd = true; bool tsStartUdfd = true;
#endif
// wal // wal
int64_t tsWalFsyncDataSizeLimit = (100 * 1024 * 1024L); int64_t tsWalFsyncDataSizeLimit = (100 * 1024 * 1024L);

View File

@ -59,11 +59,9 @@ static int32_t dmOpenMgmt(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
return -1; return -1;
} }
#ifndef WINDOWS
if (udfStartUdfd(pMgmt->pData->dnodeId) != 0) { if (udfStartUdfd(pMgmt->pData->dnodeId) != 0) {
dError("failed to start udfd"); dError("failed to start udfd");
} }
#endif
pOutput->pMgmt = pMgmt; pOutput->pMgmt = pMgmt;
return 0; return 0;

View File

@ -57,13 +57,11 @@ static int32_t qmOpen(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
} }
tmsgReportStartup("qnode-impl", "initialized"); tmsgReportStartup("qnode-impl", "initialized");
#ifndef WINDOWS
if (udfcOpen() != 0) { if (udfcOpen() != 0) {
dError("qnode can not open udfc"); dError("qnode can not open udfc");
qmClose(pMgmt); qmClose(pMgmt);
return -1; return -1;
} }
#endif
if (qmStartWorker(pMgmt) != 0) { if (qmStartWorker(pMgmt) != 0) {
dError("failed to start qnode worker since %s", terrstr()); dError("failed to start qnode worker since %s", terrstr());

View File

@ -65,13 +65,11 @@ int32_t smOpen(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
} }
tmsgReportStartup("snode-worker", "initialized"); tmsgReportStartup("snode-worker", "initialized");
#ifndef WINDOWS
if (udfcOpen() != 0) { if (udfcOpen() != 0) {
dError("failed to open udfc in snode"); dError("failed to open udfc in snode");
smClose(pMgmt); smClose(pMgmt);
return -1; return -1;
} }
#endif
pOutput->pMgmt = pMgmt; pOutput->pMgmt = pMgmt;
return 0; return 0;

View File

@ -571,12 +571,10 @@ static int32_t vmInit(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
} }
tmsgReportStartup("vnode-vnodes", "initialized"); tmsgReportStartup("vnode-vnodes", "initialized");
#ifndef WINDOWS
if (udfcOpen() != 0) { if (udfcOpen() != 0) {
dError("failed to open udfc in vnode"); dError("failed to open udfc in vnode");
goto _OVER; goto _OVER;
} }
#endif
code = 0; code = 0;

View File

@ -198,10 +198,8 @@ void dmCleanup() {
monCleanup(); monCleanup();
syncCleanUp(); syncCleanUp();
walCleanUp(); walCleanUp();
#ifndef WINDOWS
udfcClose(); udfcClose();
udfStopUdfd(); udfStopUdfd();
#endif
taosStopCacheRefreshWorker(); taosStopCacheRefreshWorker();
dmDiskClose(); dmDiskClose();
dInfo("dnode env is cleaned up"); dInfo("dnode env is cleaned up");