Fix slow connection ramp-up caused by up_wait_retry_interval pausing operations on first connection attempt

hugo-docs
Vitaliy Filippov 2022-05-06 02:11:48 +03:00
parent 834554c523
commit 714dda8151
2 changed files with 12 additions and 8 deletions

@ -1 +1 @@
Subproject commit 6e201464060ace53db809d65da7b0e2800673f8f
Subproject commit 903ec858bc8ab00fc0fbd44c23f0ab7770772353

View File

@ -9,6 +9,7 @@
#define PART_SENT 1
#define PART_DONE 2
#define PART_ERROR 4
#define PART_RETRY 8
#define CACHE_DIRTY 1
#define CACHE_FLUSHING 2
#define CACHE_REPEATING 3
@ -670,6 +671,8 @@ resume_2:
if (!try_send(op, i))
{
// We'll need to retry again
if (op->parts[i].flags & PART_RETRY)
{
op->up_wait = true;
if (!retry_timeout_id)
{
@ -679,6 +682,7 @@ resume_2:
continue_ops(true);
});
}
}
op->state = 2;
}
}
@ -746,7 +750,7 @@ resume_3:
{
for (int i = 0; i < op->parts.size(); i++)
{
op->parts[i].flags = 0;
op->parts[i].flags = PART_RETRY;
}
goto resume_2;
}