Trace group avatar assembly resets and block mismatches
This commit is contained in:
1 parent
46f4ce7091
commit
3b47a56076
1 file changed
+5
@@ -330,6 +330,8 @@ static void ga_receive(struct ETCP_CONN* conn, struct ll_entry* entry) {
|
||||
malformed:
|
||||
DEBUG_WARN(DEBUG_CATEGORY_CHAT, "group avatar: malformed/mixed blocks group=%llu peer=%016llx bytes=%zu",
|
||||
(unsigned long long)group, (unsigned long long)peer, length);
|
||||
if (p) DEBUG_WARN(DEBUG_CATEGORY_CHAT, "group avatar: receive state rx=%d offset=%u version=%llu requested=%llu",
|
||||
p->rx != NULL, p->rx_offset, (unsigned long long)(p->rx ? p->rx->version : 0), (unsigned long long)p->requested_at);
|
||||
if (p) { ga_release(p, 0); p->requested_at = get_time_tb(); }
|
||||
out:
|
||||
if (entry) { queue_dgram_free(entry); queue_entry_free(entry); }
|
||||
@@ -347,6 +349,9 @@ static void ga_tick(void* arg) {
|
||||
struct ga_peer* p = ga_find(ctx, group->group_id, item->node_id, 1); if (!p) continue;
|
||||
p->seen = 1;
|
||||
if (p->epoch != item->local_epoch) {
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_CHAT, "group avatar: session epoch reset group=%llu peer=%016llx old=%llu new=%llu tx=%d rx=%d",
|
||||
(unsigned long long)p->group, (unsigned long long)p->peer, (unsigned long long)p->epoch,
|
||||
(unsigned long long)item->local_epoch, p->tx != NULL, p->rx != NULL);
|
||||
ga_release(p, 1); ga_release(p, 0); p->epoch = item->local_epoch; p->requested_at = 0; p->state_pending = 1;
|
||||
}
|
||||
if (now - p->advertised_at >= GA_EXCHANGE_TB) p->state_pending = 1;
|
||||
|
||||
Reference in new issue
Block a user