提交 a93e4876 编写于 作者: H hjxilinx

[tbase-1212]

上级 24863d6d
......@@ -218,7 +218,7 @@ comp(Y) ::= COMP INTEGER(X). { Y = X; }
prec(Y) ::= PRECISION STRING(X). { Y = X; }
%type db_optr {SCreateDBInfo}
db_optr ::= . {}
db_optr(Y) ::= . {memset(&Y, 0, sizeof(SCreateDBInfo));}
db_optr(Y) ::= db_optr(Z) tables(X). { Y = Z; Y.tablesPerVnode = strtol(X.z, NULL, 10); }
db_optr(Y) ::= db_optr(Z) cache(X). { Y = Z; Y.cacheBlockSize = strtol(X.z, NULL, 10); }
db_optr(Y) ::= db_optr(Z) replica(X). { Y = Z; Y.replica = strtol(X.z, NULL, 10); }
......
......@@ -596,7 +596,7 @@ int vnodeInsertPoints(SMeterObj *pObj, char *cont, int contLen, char source, voi
}
pData = pSubmit->payLoad;
code = 0;
code = TSDB_CODE_SUCCESS;
TSKEY firstKey = *((TSKEY *)pData);
TSKEY lastKey = *((TSKEY *)(pData + pObj->bytesPerPoint * (numOfPoints - 1)));
......@@ -613,8 +613,7 @@ int vnodeInsertPoints(SMeterObj *pObj, char *cont, int contLen, char source, voi
goto _over;
}
for (i = 0; i < numOfPoints; ++i) {
// meter will be dropped, abort current insertion
for (i = 0; i < numOfPoints; ++i) { // meter will be dropped, abort current insertion
if (pObj->state >= TSDB_METER_STATE_DELETING) {
dWarn("vid:%d sid:%d id:%s, meter is dropped, abort insert, state:%d", pObj->vnode, pObj->sid, pObj->meterId,
pObj->state);
......@@ -656,10 +655,9 @@ int vnodeInsertPoints(SMeterObj *pObj, char *cont, int contLen, char source, voi
pVnode->version++;
pthread_mutex_unlock(&(pVnode->vmutex));
vnodeClearMeterState(pObj, TSDB_METER_STATE_INSERT);
_over:
vnodeClearMeterState(pObj, TSDB_METER_STATE_INSERT);
dTrace("vid:%d sid:%d id:%s, %d out of %d points are inserted, lastKey:%ld source:%d, vnode total storage: %ld",
pObj->vnode, pObj->sid, pObj->meterId, points, numOfPoints, pObj->lastKey, source,
pVnode->vnodeStatistic.totalStorage);
......
......@@ -1934,7 +1934,6 @@ static void yy_reduce(
/********** Begin reduce actions **********************************************/
YYMINORTYPE yylhsminor;
case 0: /* program ::= cmd */
case 79: /* db_optr ::= */ yytestcase(yyruleno==79);
{}
break;
case 1: /* cmd ::= SHOW DATABASES */
......@@ -2146,6 +2145,9 @@ static void yy_reduce(
case 78: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==78);
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
break;
case 79: /* db_optr ::= */
{memset(&yymsp[1].minor.yy398, 0, sizeof(SCreateDBInfo));}
break;
case 80: /* db_optr ::= db_optr tables */
case 94: /* alter_db_optr ::= alter_db_optr tables */ yytestcase(yyruleno==94);
{ yylhsminor.yy398 = yymsp[-1].minor.yy398; yylhsminor.yy398.tablesPerVnode = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册