提交 079e586a 编写于 作者: dengyihao's avatar dengyihao

fix: fix mem size limit

上级 730851ec
...@@ -33,11 +33,11 @@ typedef struct STaosQnode { ...@@ -33,11 +33,11 @@ typedef struct STaosQnode {
} STaosQnode; } STaosQnode;
typedef struct STaosQueue { typedef struct STaosQueue {
STaosQnode *head; STaosQnode * head;
STaosQnode *tail; STaosQnode * tail;
STaosQueue *next; // for queue set STaosQueue * next; // for queue set
STaosQset *qset; // for queue set STaosQset * qset; // for queue set
void *ahandle; // for queue set void * ahandle; // for queue set
FItem itemFp; FItem itemFp;
FItems itemsFp; FItems itemsFp;
TdThreadMutex mutex; TdThreadMutex mutex;
...@@ -46,8 +46,8 @@ typedef struct STaosQueue { ...@@ -46,8 +46,8 @@ typedef struct STaosQueue {
} STaosQueue; } STaosQueue;
typedef struct STaosQset { typedef struct STaosQset {
STaosQueue *head; STaosQueue * head;
STaosQueue *current; STaosQueue * current;
TdThreadMutex mutex; TdThreadMutex mutex;
tsem_t sem; tsem_t sem;
int32_t numOfQueues; int32_t numOfQueues;
...@@ -85,7 +85,7 @@ void taosSetQueueFp(STaosQueue *queue, FItem itemFp, FItems itemsFp) { ...@@ -85,7 +85,7 @@ void taosSetQueueFp(STaosQueue *queue, FItem itemFp, FItems itemsFp) {
void taosCloseQueue(STaosQueue *queue) { void taosCloseQueue(STaosQueue *queue) {
if (queue == NULL) return; if (queue == NULL) return;
STaosQnode *pTemp; STaosQnode *pTemp;
STaosQset *qset; STaosQset * qset;
taosThreadMutexLock(&queue->mutex); taosThreadMutexLock(&queue->mutex);
STaosQnode *pNode = queue->head; STaosQnode *pNode = queue->head;
...@@ -152,7 +152,7 @@ void *taosAllocateQitem(int32_t size, EQItype itype) { ...@@ -152,7 +152,7 @@ void *taosAllocateQitem(int32_t size, EQItype itype) {
if (itype == RPC_QITEM) { if (itype == RPC_QITEM) {
int64_t alloced = atomic_add_fetch_64(&tsRpcQueueMemoryUsed, size); int64_t alloced = atomic_add_fetch_64(&tsRpcQueueMemoryUsed, size);
if (alloced > tsRpcQueueMemoryUsed) { if (alloced > tsRpcQueueMemoryAllowed) {
taosMemoryFree(pNode); taosMemoryFree(pNode);
terrno = TSDB_CODE_OUT_OF_RPC_MEMORY_QUEUE; terrno = TSDB_CODE_OUT_OF_RPC_MEMORY_QUEUE;
return NULL; return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册