Merge branch '3.0' into enh/opt-transport

This commit is contained in:
yihaoDeng 2024-09-15 15:44:03 +08:00
parent 9ac3ca9b2f
commit 3ea509d3c7
2 changed files with 16 additions and 16 deletions

View File

@ -361,7 +361,7 @@ void cliResetConnTimer(SCliConn* conn) {
} }
} }
void cliHandleBatchResp(SCliConn* conn) { ASSERT(0); } void cliHandleBatchResp(SCliConn* conn) { return; }
void destroyCliConnQTable(SCliConn* conn) { void destroyCliConnQTable(SCliConn* conn) {
void* pIter = taosHashIterate(conn->pQTable, NULL); void* pIter = taosHashIterate(conn->pQTable, NULL);
@ -523,7 +523,7 @@ void cliHandleResp(SCliConn* conn) {
taosMemoryFree(pHead); taosMemoryFree(pHead);
tDebug("%s conn %p recv invalid packet ", CONN_GET_INST_LABEL(conn), conn); tDebug("%s conn %p recv invalid packet ", CONN_GET_INST_LABEL(conn), conn);
// TODO: notify cb // TODO: notify cb
ASSERT(0); // ASSERT(0);
pThrd->notifyExceptCb(pThrd, NULL, NULL); pThrd->notifyExceptCb(pThrd, NULL, NULL);
return; return;
} }
@ -831,8 +831,8 @@ static void cliRecvCb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) {
return; return;
} }
int32_t fd; int32_t fd;
uv_fileno((uv_handle_t*)handle, &fd); (void)uv_fileno((uv_handle_t*)handle, &fd);
taosSetSockOpt2(fd); (void)taosSetSockOpt2(fd);
SCliConn* conn = handle->data; SCliConn* conn = handle->data;
@ -1635,8 +1635,8 @@ void cliHandleBatchReq(SCliThrd* pThrd, SCliReq* pReq) {
// do nothing, notiy // do nothing, notiy
return; return;
} else { } else {
ASSERT(code == 0); /// ASSERT(code == 0);
addConnToHeapCache(pThrd->connHeapCache, pConn); (void)addConnToHeapCache(pThrd->connHeapCache, pConn);
} }
} }
code = cliHandleState_mayUpdateState(pThrd, pReq, pConn); code = cliHandleState_mayUpdateState(pThrd, pReq, pConn);

View File

@ -551,13 +551,13 @@ static bool uvHandleReq(SSvrConn* pConn) {
} }
if (pHead->seqNum == 0) { if (pHead->seqNum == 0) {
ASSERT(0); // ASSERT(0);
} }
transMsg.info.handle = (void*)transAcquireExHandle(uvGetConnRefOfThrd(pThrd), pConn->refId); transMsg.info.handle = (void*)transAcquireExHandle(uvGetConnRefOfThrd(pThrd), pConn->refId);
transMsg.info.refIdMgt = pThrd->connRefMgt; transMsg.info.refIdMgt = pThrd->connRefMgt;
ASSERTS(transMsg.info.handle != NULL, "trans-svr failed to alloc handle to msg"); // ASSERTS(transMsg.info.handle != NULL, "trans-svr failed to alloc handle to msg");
// pHead->noResp = 1, // pHead->noResp = 1,
// 1. server application should not send resp on handle // 1. server application should not send resp on handle
@ -601,9 +601,8 @@ void uvOnRecvCb(uv_stream_t* cli, ssize_t nread, const uv_buf_t* buf) {
} }
STrans* pInst = conn->pInst; STrans* pInst = conn->pInst;
int32_t fd = 0; int32_t fd = 0;
uv_fileno((uv_handle_t*)cli, &fd); (void)uv_fileno((uv_handle_t*)cli, &fd);
taosSetSockOpt2(fd); (void)taosSetSockOpt2(fd);
setsockopt(fd, IPPROTO_TCP, TCP_QUICKACK, (int[]){1}, sizeof(int));
SConnBuffer* pBuf = &conn->readBuf; SConnBuffer* pBuf = &conn->readBuf;
if (nread > 0) { if (nread > 0) {
@ -727,10 +726,11 @@ static int uvPrepareSendData(SSvrRespMsg* smsg, uv_buf_t* wb) {
// handle invalid drop_task resp, TD-20098 // handle invalid drop_task resp, TD-20098
if (pConn->inType == TDMT_SCH_DROP_TASK && pMsg->code == TSDB_CODE_VND_INVALID_VGROUP_ID) { if (pConn->inType == TDMT_SCH_DROP_TASK && pMsg->code == TSDB_CODE_VND_INVALID_VGROUP_ID) {
ASSERT(0); // ASSERT(0);
// (void)transQueuePop(&pConn->resps); // (void)transQueuePop(&pConn->resps);
// destroySmsg(smsg); // destroySmsg(smsg);
// return TSDB_CODE_INVALID_MSG; // return TSDB_CODE_INVALID_MSG;
return 0;
} }
pHead->msgType = (0 == pMsg->msgType ? pConn->inType + 1 : pMsg->msgType); pHead->msgType = (0 == pMsg->msgType ? pConn->inType + 1 : pMsg->msgType);
@ -1626,7 +1626,7 @@ void uvHandleQuit(SSvrRespMsg* msg, SWorkThrd* thrd) {
taosMemoryFree(msg); taosMemoryFree(msg);
} }
void uvHandleRelease(SSvrRespMsg* msg, SWorkThrd* thrd) { void uvHandleRelease(SSvrRespMsg* msg, SWorkThrd* thrd) {
ASSERT(0); return;
// int32_t code = 0; // int32_t code = 0;
// SSvrConn* conn = msg->pConn; // SSvrConn* conn = msg->pConn;
// if (conn->status == ConnAcquire) { // if (conn->status == ConnAcquire) {