fix(rpc): fix timeout error

This commit is contained in:
yihaoDeng 2022-05-05 20:17:53 +08:00
parent f49524daa1
commit ae33656e15
2 changed files with 3 additions and 3 deletions

View File

@ -435,7 +435,7 @@ int transDQSched(SDelayQueue* queue, void (*func)(void* arg), void* arg, uint64_
if (minNode) { if (minNode) {
SDelayTask* minTask = container_of(minNode, SDelayTask, node); SDelayTask* minTask = container_of(minNode, SDelayTask, node);
if (minTask->execTime < task->execTime) { if (minTask->execTime < task->execTime) {
timeoutMs = minTask->execTime <= now ? 0 : now - minTask->execTime; timeoutMs = minTask->execTime <= now ? 0 : minTask->execTime - now;
} }
} }

View File

@ -66,7 +66,7 @@ print ============= create database
# | REPLICA value [1 | 3] # | REPLICA value [1 | 3]
# | WAL value [1 | 2] # | WAL value [1 | 2]
sql create database db CACHELAST 3 COMP 0 DAYS 345600 FSYNC 1000 MAXROWS 8000 MINROWS 10 KEEP 1440000 PRECISION 'ns' REPLICA 1 WAL 2 VGROUPS 6 SINGLE_STABLE 1 sql create database db CACHELAST 3 COMP 0 DAYS 345600 FSYNC 1000 MAXROWS 8000 MINROWS 10 KEEP 1440000 PRECISION 'ns' REPLICA 3 WAL 2 VGROUPS 6 SINGLE_STABLE 1
sql show databases sql show databases
print rows: $rows print rows: $rows
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09
@ -86,7 +86,7 @@ endi
if $data3_db != 0 then # ntables if $data3_db != 0 then # ntables
return -1 return -1
endi endi
if $data4_db != 1 then # replica if $data4_db != 3 then # replica
return -1 return -1
endi endi
if $data5_db != nostrict then # strict if $data5_db != nostrict then # strict