enh: batch create table
This commit is contained in:
parent
e392b39323
commit
bc1f9bca93
|
@ -68,6 +68,7 @@ static void *dmNotifyThreadFp(void *param) {
|
||||||
bool wait = true;
|
bool wait = true;
|
||||||
int32_t nDnode = 0;
|
int32_t nDnode = 0;
|
||||||
int64_t lastNotify = 0;
|
int64_t lastNotify = 0;
|
||||||
|
int64_t lastFetchDnode = 0;
|
||||||
SNotifyReq req = {0};
|
SNotifyReq req = {0};
|
||||||
while (1) {
|
while (1) {
|
||||||
if (pMgmt->pData->dropped || pMgmt->pData->stopped) break;
|
if (pMgmt->pData->dropped || pMgmt->pData->stopped) break;
|
||||||
|
@ -79,9 +80,10 @@ static void *dmNotifyThreadFp(void *param) {
|
||||||
goto _skip;
|
goto _skip;
|
||||||
}
|
}
|
||||||
int64_t current = taosGetTimestampMs();
|
int64_t current = taosGetTimestampMs();
|
||||||
if (current - lastNotify > 1000) {
|
if (current - lastFetchDnode > 1000) {
|
||||||
nDnode = dmGetDnodeSize(pMgmt->pData);
|
nDnode = dmGetDnodeSize(pMgmt->pData);
|
||||||
if (nDnode < 1) nDnode = 1;
|
if (nDnode < 1) nDnode = 1;
|
||||||
|
lastFetchDnode = current;
|
||||||
}
|
}
|
||||||
if (req.dnodeId == 0 || req.clusterId == 0) {
|
if (req.dnodeId == 0 || req.clusterId == 0) {
|
||||||
req.dnodeId = pMgmt->pData->dnodeId;
|
req.dnodeId = pMgmt->pData->dnodeId;
|
||||||
|
|
Loading…
Reference in New Issue