diff --git a/source/dnode/mgmt/node_mgmt/src/dmEnv.c b/source/dnode/mgmt/node_mgmt/src/dmEnv.c index f79c9d97b8..6f13abcebc 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmEnv.c +++ b/source/dnode/mgmt/node_mgmt/src/dmEnv.c @@ -146,9 +146,13 @@ static bool dmCheckDataDirVersion() { return true; } +#if defined(USE_S3) + extern int32_t s3Begin(); extern void s3End(); +#endif + int32_t dmInit() { dInfo("start to init dnode env"); if (dmDiskInit() != 0) return -1; @@ -159,7 +163,9 @@ int32_t dmInit() { if (dmInitMonitor() != 0) return -1; if (dmInitAudit() != 0) return -1; if (dmInitDnode(dmInstance()) != 0) return -1; +#if defined(USE_S3) if (s3Begin() != 0) return -1; +#endif dInfo("dnode env is initialized"); return 0; @@ -185,7 +191,9 @@ void dmCleanup() { udfStopUdfd(); taosStopCacheRefreshWorker(); dmDiskClose(); +#if defined(USE_S3) s3End(); +#endif dInfo("dnode env is cleaned up"); taosCleanupCfg();