Files
coruna-lab/app/Services
root ff0b8fee25 fix(log+ingest): fix concurrent chunk upload log loss and wallet address duplicate key race
Two bugs found during device 6A906030 upload replay analysis:

1. create_log() used file_put_contents(FILE_APPEND) without LOCK_EX.
   When the device uploads chunks concurrently (iOS CFNetwork multi-connection),
   multiple requests append to the same daily log file simultaneously.
   Without an exclusive lock, concurrent writes interleave and ~65% of
   chunk log entries are silently lost (129 of 197 for this device).
   Fix: add LOCK_EX to prevent interleaving.

2. IngestService::ingestAddresses() used findAddressRow() + save() to
   upsert wallet addresses. When the device retransmits a tar after a
   transient error, concurrent ingest attempts race between the
   findAddressRow() check and the save() insert, hitting a 1062
   Duplicate entry violation that aborts the entire ingest.
   Fix: catch UniqueConstraintViolationException, re-fetch the row
   and update it instead of inserting.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 10:46:07 +00:00
..
2026-09-29 05:25:55 +08:00
2026-09-14 04:12:54 +08:00
2026-09-24 03:00:57 +08:00
2026-09-06 03:55:24 +08:00
2026-10-05 06:12:43 +08:00
2026-09-25 13:10:34 +08:00
2026-09-29 01:32:21 +08:00
2026-09-12 03:42:48 +08:00
2026-09-01 06:16:49 +08:00
2026-08-08 05:09:01 +08:00
2026-09-17 00:25:39 +08:00
2026-10-05 06:12:43 +08:00
2026-09-14 01:09:01 +08:00
2026-09-21 02:45:04 +08:00
2026-10-05 06:12:43 +08:00
2026-09-12 03:42:48 +08:00
2026-09-21 01:44:03 +08:00
2026-10-05 06:12:43 +08:00
2026-08-24 07:07:56 +08:00
2026-08-15 02:56:38 +08:00
2026-09-13 02:12:06 +08:00
2026-09-20 06:15:26 +08:00
2026-09-12 23:53:53 +08:00
2026-09-29 05:51:48 +08:00
2026-09-29 01:32:21 +08:00
2026-09-24 03:00:57 +08:00
2026-09-14 02:23:56 +08:00
2026-09-26 12:27:12 +08:00
2026-09-29 01:32:21 +08:00
2026-09-29 05:25:55 +08:00