Preserve retry priority during bounded burst measurements
This commit is contained in:
1 parent
c87cc6e4a2
commit
93bf846fc4
2 files changed
+20
-4
No files matched your search
@@ -1062,7 +1062,7 @@ static struct INFLIGHT_PACKET* send_queue_select(struct ETCP_CONN* conn, struct
|
||||
if (l->burst_active && l->initialized && l->link_status) { burst = l; break; }
|
||||
struct INFLIGHT_PACKET* fresh = NULL;
|
||||
struct ETCP_LINK* fresh_link = NULL;
|
||||
unsigned examined = 0;
|
||||
unsigned examined = 0, retry_elsewhere = 0;
|
||||
for (struct ll_entry* e = conn->input_send_q->head; e; e = e->next) {
|
||||
struct INFLIGHT_PACKET* packet = (struct INFLIGHT_PACKET*)e;
|
||||
examined++;
|
||||
@@ -1075,7 +1075,8 @@ static struct INFLIGHT_PACKET* send_queue_select(struct ETCP_CONN* conn, struct
|
||||
}
|
||||
link = burst;
|
||||
} else link = etcp_loadbalancer_select_link(conn, packet->ll.len, packet->last_attempt_id ? packet : NULL);
|
||||
if (!link || (burst && link != burst)) continue;
|
||||
if (!link) continue;
|
||||
if (burst && link != burst) { if (packet->last_attempt_id) retry_elsewhere = 1; continue; }
|
||||
if (packet->last_attempt_id) {
|
||||
*chosen = link;
|
||||
DEBUG_TRACE(DEBUG_CATEGORY_ETCP, "[%s] send scan examined=%u retry_seq=%u link=%u", conn->log_name,
|
||||
@@ -1084,6 +1085,8 @@ static struct INFLIGHT_PACKET* send_queue_select(struct ETCP_CONN* conn, struct
|
||||
}
|
||||
fresh = packet; fresh_link = link;
|
||||
}
|
||||
// Короткая burst-серия идёт FILLER, пока готовый повтор другого пути ждёт её завершения; новые DATA его не обгоняют.
|
||||
if (retry_elsewhere) fresh = NULL;
|
||||
*chosen = fresh ? fresh_link : burst;
|
||||
DEBUG_TRACE(DEBUG_CATEGORY_ETCP, "[%s] send scan examined=%u fresh_seq=%u link=%u", conn->log_name, examined,
|
||||
fresh ? fresh->seq : 0, *chosen ? (*chosen)->local_link_id : 0);
|
||||
|
||||
Reference in new issue
Block a user