From 8006ee1d8e0d03f73f6ca22112d838b97018add4 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 15 Jul 2022 14:56:23 +0800 Subject: [PATCH] feat: add time unsynced check --- source/client/src/clientMsgHandler.c | 2 +- source/dnode/mnode/impl/src/mndProfile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/client/src/clientMsgHandler.c b/source/client/src/clientMsgHandler.c index 331ca86d78..520a566e2b 100644 --- a/source/client/src/clientMsgHandler.c +++ b/source/client/src/clientMsgHandler.c @@ -57,7 +57,7 @@ int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) { int32_t delta = abs(now - connectRsp.svrTimestamp); if (delta > timestampDeltaLimit) { code = TSDB_CODE_TIME_UNSYNCED; - tscError("time diff: %" PRId64 "ms is too big", delta); + tscError("time diff:%ds is too big", delta); taosMemoryFree(pMsg->pData); setErrno(pRequest, code); tsem_post(&pRequest->body.rspSem); diff --git a/source/dnode/mnode/impl/src/mndProfile.c b/source/dnode/mnode/impl/src/mndProfile.c index 81bd887ad9..a1da68606b 100644 --- a/source/dnode/mnode/impl/src/mndProfile.c +++ b/source/dnode/mnode/impl/src/mndProfile.c @@ -624,7 +624,7 @@ static int32_t mndProcessHeartBeatReq(SRpcMsg *pReq) { } SClientHbBatchRsp batchRsp = {0}; - batchRsp.svrTimestamp = taosGetTimestampMs(); + batchRsp.svrTimestamp = taosGetTimestampSec(); batchRsp.rsps = taosArrayInit(0, sizeof(SClientHbRsp)); int32_t sz = taosArrayGetSize(batchReq.reqs);