diff --git a/src/system/src/vnodeMeter.c b/src/system/src/vnodeMeter.c index bba17327a29e3839a11d87fdb857214b20212c37..b5cc5ae8739e50eb19216ecf9af0258fcccdc544 100644 --- a/src/system/src/vnodeMeter.c +++ b/src/system/src/vnodeMeter.c @@ -696,6 +696,9 @@ void vnodeUpdateMeter(void *param, void *tmrId) { pthread_mutex_unlock(&pVnode->vmutex); if (num > 0 || state != TSDB_METER_STATE_READY) { + // the state may have been changed by vnodeSetMeterState, recover it in the first place + vnodeClearMeterState(pObj, TSDB_METER_STATE_UPDATING); + dTrace("vid:%d sid:%d id:%s, update failed, retry later, numOfQueries:%d, state:%d", pNew->vnode, pNew->sid, pNew->meterId, num, state);