From 3332ba5729c8b600c8339cc79647e5f6a5767115 Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Fri, 10 Jan 2020 14:33:42 +0800 Subject: [PATCH] [tbase-875] check for client submit block sversion, if the data from client has smaller server, return invalid sql msg --- src/system/detail/src/vnodeMeter.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/system/detail/src/vnodeMeter.c b/src/system/detail/src/vnodeMeter.c index 06d0fd8b68..7421982f26 100644 --- a/src/system/detail/src/vnodeMeter.c +++ b/src/system/detail/src/vnodeMeter.c @@ -596,6 +596,11 @@ int vnodeInsertPoints(SMeterObj *pObj, char *cont, int contLen, char source, voi vnodeSendMeterCfgMsg(pObj->vnode, pObj->sid); code = TSDB_CODE_ACTION_IN_PROGRESS; return code; + } else if (pObj->sversion > sversion) { + dTrace("vid:%d sid:%d id:%s, client schema out of date, sql is invalid. client sversion:%d vnode sversion:%d", + pObj->vnode, pObj->sid, pObj->meterId, pObj->sversion, sversion); + code = TSDB_CODE_INVALID_SQL; + return code; } pData = pSubmit->payLoad; -- GitLab