From a2e074be3442bacc69e0aa8ec411612715daa91b Mon Sep 17 00:00:00 2001 From: slzhou Date: Mon, 9 May 2022 20:39:02 +0800 Subject: [PATCH] feature(udf):move start/stop udfd out of dnode management preparation --- source/dnode/mgmt/implement/src/dmHandle.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/dnode/mgmt/implement/src/dmHandle.c b/source/dnode/mgmt/implement/src/dmHandle.c index 9597307567..cd01f185ce 100644 --- a/source/dnode/mgmt/implement/src/dmHandle.c +++ b/source/dnode/mgmt/implement/src/dmHandle.c @@ -311,11 +311,11 @@ static void dmWatchUdfd(void *args) { return; } -static int32_t dmStartUdfd(SDnode *pDnode, int32_t startDnodeId) { +static int32_t dmStartUdfd(SUdfdData *pUdfdData, int32_t startDnodeId) { char dnodeId[8] = {0}; - snprintf(dnodeId, sizeof(dnodeId), "%d", pDnode->data.dnodeId); + snprintf(dnodeId, sizeof(dnodeId), "%d", startDnodeId); uv_os_setenv("DNODE_ID", dnodeId); - SUdfdData *pData = &pDnode->udfdData; + SUdfdData *pData = pUdfdData; pData->dnodeId = startDnodeId; if (pData->startCalled) { dInfo("dnode-mgmt start udfd already called"); @@ -385,7 +385,7 @@ static int32_t dmInitMgmt(SMgmtWrapper *pWrapper) { } dmReportStartup(pDnode, "dnode-transport", "initialized"); - if (dmStartUdfd(pDnode, pDnode->data.dnodeId) != 0) { + if (dmStartUdfd(&pDnode->udfdData, pDnode->data.dnodeId) != 0) { dError("failed to start udfd"); }