Restore the state of the meter in case of failing to launch the update procedure.

This commit is contained in:
hjxilinx 2019-11-04 13:45:45 +08:00
parent 654a5061ff
commit f5cd00282c
1 changed files with 3 additions and 0 deletions

View File

@ -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);