From 67d6458254ac4cf490e394808484c8d2eade31b6 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 30 Nov 2024 00:34:13 +0800 Subject: [PATCH] fix: check return value. --- source/dnode/mnode/impl/src/mndStreamUtil.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/dnode/mnode/impl/src/mndStreamUtil.c b/source/dnode/mnode/impl/src/mndStreamUtil.c index ad2f71a064..bb666eb6dd 100644 --- a/source/dnode/mnode/impl/src/mndStreamUtil.c +++ b/source/dnode/mnode/impl/src/mndStreamUtil.c @@ -1233,7 +1233,11 @@ int32_t setTaskAttrInResBlock(SStreamObj *pStream, SStreamTask *pTask, SSDataBlo snprintf(buf, tListLen(buf), sinkStr, pe->sinkDataSize); } else if (pTask->info.taskLevel == TASK_LEVEL__SOURCE) { // offset info if (pTask->info.trigger == STREAM_TRIGGER_FORCE_WINDOW_CLOSE) { - taosFormatUtcTime(buf, tListLen(buf), pe->processedVer, precision); + int32_t ret = taosFormatUtcTime(buf, tListLen(buf), pe->processedVer, precision); + if (ret != 0) { + mError("failed to format processed timewindow, skey:%" PRId64, pe->processedVer); + memset(buf, 0, tListLen(buf)); + } } else { const char *offsetStr = "%" PRId64 " [%" PRId64 ", %" PRId64 "]"; snprintf(buf, tListLen(buf), offsetStr, pe->processedVer, pe->verRange.minVer, pe->verRange.maxVer);