diff --git a/src/lib/oblog/ob_log.cpp b/src/lib/oblog/ob_log.cpp index e69093eb99fd24e108dd53493ae67f818b60be7c..0dd49e9815c0647ed9556e45b3fb5ff207644463 100644 --- a/src/lib/oblog/ob_log.cpp +++ b/src/lib/oblog/ob_log.cpp @@ -1528,12 +1528,15 @@ void ObLogger::do_async_flush_to_file(ObLogItem **log_item, const int64_t count) } } - struct iovec vec[MAX_FD_FILE][GROUP_COMMIT_MAX_ITEM_COUNT] = {0}; + struct iovec vec[MAX_FD_FILE][GROUP_COMMIT_MAX_ITEM_COUNT]; int iovcnt[MAX_FD_FILE] = {0}; int large_iovcnt[MAX_FD_FILE] = {0}; - struct iovec wf_vec[MAX_FD_FILE][GROUP_COMMIT_MAX_ITEM_COUNT] = {0}; + struct iovec wf_vec[MAX_FD_FILE][GROUP_COMMIT_MAX_ITEM_COUNT]; int wf_iovcnt[MAX_FD_FILE] = {0}; + memset(vec, 0, sizeof(vec)); + memset(wf_vec, 0, sizeof(wf_vec)); + ObLogFDType fd_type = MAX_FD_FILE; for (int64_t i = 0; i < count; ++i) { if (OB_ISNULL(log_item[i])) {