fix(udf): disable the auto remove for *.so

This commit is contained in:
Haojun Liao 2023-01-03 14:23:27 +08:00
parent f93abddc88
commit b8aa4fae8a
1 changed files with 3 additions and 2 deletions

View File

@ -461,13 +461,14 @@ void udfdProcessRpcRsp(void *parent, SRpcMsg *pMsg, SEpSet *pEpSet) {
#else #else
snprintf(path, sizeof(path), "%s/lib%s.so", tsTempDir, pFuncInfo->name); snprintf(path, sizeof(path), "%s/lib%s.so", tsTempDir, pFuncInfo->name);
#endif #endif
TdFilePtr file =
taosOpenFile(path, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_READ | TD_FILE_TRUNC | TD_FILE_AUTO_DEL); TdFilePtr file = taosOpenFile(path, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_READ | TD_FILE_TRUNC);
if (file == NULL) { if (file == NULL) {
fnError("udfd write udf shared library: %s failed, error: %d %s", path, errno, strerror(errno)); fnError("udfd write udf shared library: %s failed, error: %d %s", path, errno, strerror(errno));
msgInfo->code = TSDB_CODE_FILE_CORRUPTED; msgInfo->code = TSDB_CODE_FILE_CORRUPTED;
goto _return; goto _return;
} }
int64_t count = taosWriteFile(file, pFuncInfo->pCode, pFuncInfo->codeSize); int64_t count = taosWriteFile(file, pFuncInfo->pCode, pFuncInfo->codeSize);
if (count != pFuncInfo->codeSize) { if (count != pFuncInfo->codeSize) {
fnError("udfd write udf shared library failed"); fnError("udfd write udf shared library failed");