Files
rengine/shared/services
Yogesh OjhaandClaude Opus 5 ca150576e0 fix(scan): remove a deadlock window and stop failed facets zeroing a count
cdn_check and passive_ports run at the same level and both call
ip_inventory.ensure(), which on a domain scan is the first thing to write
ip_addresses — so both insert the same rows at the same moment. The row order
came from a UNION with no ORDER BY, so the two statements could take row locks
in different sequences and deadlock, failing a stage for no reason. Both
inventories now insert in a deterministic key order.

A failed facets request also overwrote the tab badge with 0, which reads as
"this scan found nothing" rather than "the request failed". Only a successful
response may restate the count now, in the Services and IPs tables alike.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BnC2xMMzV6WQnpDp5zcXoU
2026-09-04 03:27:09 +05:30
..
2026-09-02 13:04:50 +05:30