update retry
This commit is contained in:
parent
606aa61c4f
commit
fa9f48866c
|
@ -427,6 +427,8 @@ SDelayTask* transDQSched(SDelayQueue* queue, void (*func)(void* arg), void* arg,
|
|||
void transDQCancel(SDelayQueue* queue, SDelayTask* task);
|
||||
|
||||
bool transEpSetIsEqual(SEpSet* a, SEpSet* b);
|
||||
|
||||
bool transEpSetIsEqual2(SEpSet* a, SEpSet* b);
|
||||
/*
|
||||
* init global func
|
||||
*/
|
||||
|
|
|
@ -2229,7 +2229,7 @@ bool cliResetEpset(STransConnCtx* pCtx, STransMsg* pResp, bool hasEpSet) {
|
|||
EPSET_FORWARD_INUSE(&pCtx->epSet);
|
||||
}
|
||||
} else {
|
||||
if (!transEpSetIsEqual(&pCtx->epSet, &epSet)) {
|
||||
if (!transEpSetIsEqual2(&pCtx->epSet, &epSet)) {
|
||||
tDebug("epset not equal, retry new epset1");
|
||||
transPrintEpSet(&pCtx->epSet);
|
||||
transPrintEpSet(&epSet);
|
||||
|
@ -2256,7 +2256,7 @@ bool cliResetEpset(STransConnCtx* pCtx, STransMsg* pResp, bool hasEpSet) {
|
|||
EPSET_FORWARD_INUSE(&pCtx->epSet);
|
||||
}
|
||||
} else {
|
||||
if (!transEpSetIsEqual(&pCtx->epSet, &epSet)) {
|
||||
if (!transEpSetIsEqual2(&pCtx->epSet, &epSet)) {
|
||||
tDebug("epset not equal, retry new epset2");
|
||||
transPrintEpSet(&pCtx->epSet);
|
||||
transPrintEpSet(&epSet);
|
||||
|
|
|
@ -602,6 +602,17 @@ bool transEpSetIsEqual(SEpSet* a, SEpSet* b) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
bool transEpSetIsEqual2(SEpSet* a, SEpSet* b) {
|
||||
if (a->numOfEps != b->numOfEps) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < a->numOfEps; i++) {
|
||||
if (strncmp(a->eps[i].fqdn, b->eps[i].fqdn, TSDB_FQDN_LEN) != 0 || a->eps[i].port != b->eps[i].port) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static void transInitEnv() {
|
||||
refMgt = transOpenRefMgt(50000, transDestroyExHandle);
|
||||
|
|
Loading…
Reference in New Issue