未验证 提交 9eb6d735 编写于 作者: P plum-lihui 提交者: GitHub

Merge pull request #757 from taosdata/feature/liaohj

[tbase-1212]
...@@ -218,7 +218,7 @@ comp(Y) ::= COMP INTEGER(X). { Y = X; } ...@@ -218,7 +218,7 @@ comp(Y) ::= COMP INTEGER(X). { Y = X; }
prec(Y) ::= PRECISION STRING(X). { Y = X; } prec(Y) ::= PRECISION STRING(X). { Y = X; }
%type db_optr {SCreateDBInfo} %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) 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) 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); } 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 ...@@ -596,7 +596,7 @@ int vnodeInsertPoints(SMeterObj *pObj, char *cont, int contLen, char source, voi
} }
pData = pSubmit->payLoad; pData = pSubmit->payLoad;
code = 0; code = TSDB_CODE_SUCCESS;
TSKEY firstKey = *((TSKEY *)pData); TSKEY firstKey = *((TSKEY *)pData);
TSKEY lastKey = *((TSKEY *)(pData + pObj->bytesPerPoint * (numOfPoints - 1))); TSKEY lastKey = *((TSKEY *)(pData + pObj->bytesPerPoint * (numOfPoints - 1)));
...@@ -613,8 +613,7 @@ int vnodeInsertPoints(SMeterObj *pObj, char *cont, int contLen, char source, voi ...@@ -613,8 +613,7 @@ int vnodeInsertPoints(SMeterObj *pObj, char *cont, int contLen, char source, voi
goto _over; goto _over;
} }
for (i = 0; i < numOfPoints; ++i) { for (i = 0; i < numOfPoints; ++i) { // meter will be dropped, abort current insertion
// meter will be dropped, abort current insertion
if (pObj->state >= TSDB_METER_STATE_DELETING) { 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, dWarn("vid:%d sid:%d id:%s, meter is dropped, abort insert, state:%d", pObj->vnode, pObj->sid, pObj->meterId,
pObj->state); pObj->state);
...@@ -656,10 +655,9 @@ int vnodeInsertPoints(SMeterObj *pObj, char *cont, int contLen, char source, voi ...@@ -656,10 +655,9 @@ int vnodeInsertPoints(SMeterObj *pObj, char *cont, int contLen, char source, voi
pVnode->version++; pVnode->version++;
pthread_mutex_unlock(&(pVnode->vmutex)); pthread_mutex_unlock(&(pVnode->vmutex));
vnodeClearMeterState(pObj, TSDB_METER_STATE_INSERT);
_over: _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", 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, pObj->vnode, pObj->sid, pObj->meterId, points, numOfPoints, pObj->lastKey, source,
pVnode->vnodeStatistic.totalStorage); pVnode->vnodeStatistic.totalStorage);
......
...@@ -1934,7 +1934,6 @@ static void yy_reduce( ...@@ -1934,7 +1934,6 @@ static void yy_reduce(
/********** Begin reduce actions **********************************************/ /********** Begin reduce actions **********************************************/
YYMINORTYPE yylhsminor; YYMINORTYPE yylhsminor;
case 0: /* program ::= cmd */ case 0: /* program ::= cmd */
case 79: /* db_optr ::= */ yytestcase(yyruleno==79);
{} {}
break; break;
case 1: /* cmd ::= SHOW DATABASES */ case 1: /* cmd ::= SHOW DATABASES */
...@@ -2146,6 +2145,9 @@ static void yy_reduce( ...@@ -2146,6 +2145,9 @@ static void yy_reduce(
case 78: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==78); case 78: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==78);
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
break; break;
case 79: /* db_optr ::= */
{memset(&yymsp[1].minor.yy398, 0, sizeof(SCreateDBInfo));}
break;
case 80: /* db_optr ::= db_optr tables */ case 80: /* db_optr ::= db_optr tables */
case 94: /* alter_db_optr ::= alter_db_optr tables */ yytestcase(yyruleno==94); 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); } { 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.
先完成此消息的编辑!
想要评论请 注册