Merge pull request #20538 from taosdata/szhou/python-udf

enhance: add udf context from plugin traceability
This commit is contained in:
dapan1121 2023-03-21 08:44:27 +08:00 committed by GitHub
commit a070da04ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -554,6 +554,8 @@ int32_t udfdInitUdf(char *udfName, SUdf *udf) {
fnError("udf name %s init failed. error %d", udfName, err);
return err;
}
fnInfo("udf init succeeded. name %s type %d context %p", udf->name, udf->scriptType, (void*)udf->scriptUdfCtx);
return 0;
}
@ -763,6 +765,7 @@ void udfdProcessTeardownRequest(SUvUdfWork *uvUdf, SUdfRequest *request) {
}
uv_mutex_unlock(&global.udfsMutex);
if (unloadUdf) {
fnInfo("udf teardown. udf name: %s type %d: context %p", udf->name, udf->scriptType, (void*)(udf->scriptUdfCtx));
uv_cond_destroy(&udf->condReady);
uv_mutex_destroy(&udf->lock);
code = udf->scriptPlugin->udfDestroyFunc(udf->scriptUdfCtx);