提交 ccbcdbad 编写于 作者: S Shengliang Guan

fix: retry if no enough shm

上级 c715ee59
...@@ -96,6 +96,11 @@ static inline int32_t dmPushToProcQueue(SProc *proc, SProcQueue *queue, SRpcMsg ...@@ -96,6 +96,11 @@ static inline int32_t dmPushToProcQueue(SProc *proc, SProcQueue *queue, SRpcMsg
const int32_t fullLen = headLen + bodyLen + 8; const int32_t fullLen = headLen + bodyLen + 8;
const int64_t handle = (int64_t)pMsg->info.handle; const int64_t handle = (int64_t)pMsg->info.handle;
if (fullLen > queue->total) {
terrno = TSDB_CODE_OUT_OF_RANGE;
return -1;
}
taosThreadMutexLock(&queue->mutex); taosThreadMutexLock(&queue->mutex);
if (fullLen > queue->avail) { if (fullLen > queue->avail) {
taosThreadMutexUnlock(&queue->mutex); taosThreadMutexUnlock(&queue->mutex);
...@@ -448,7 +453,7 @@ void dmPutToProcPQueue(SProc *proc, SRpcMsg *pMsg, EProcFuncType ftype) { ...@@ -448,7 +453,7 @@ void dmPutToProcPQueue(SProc *proc, SRpcMsg *pMsg, EProcFuncType ftype) {
break; break;
} }
if (retry == 10) { if (terrno != TSDB_CODE_OUT_OF_SHM_MEM) {
pMsg->code = terrno; pMsg->code = terrno;
if (pMsg->contLen > 0) { if (pMsg->contLen > 0) {
rpcFreeCont(pMsg->pCont); rpcFreeCont(pMsg->pCont);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册