• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Freegle / Iznik / 24904
72%
master: 72%

Build:
Build:
LAST BUILD BRANCH: feat/distance-preference-outbound-and-frontier
DEFAULT BRANCH: master
Ran 05 Jul 2026 08:37AM UTC
Jobs 4
Files 1370
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Jul 2026 08:12AM UTC coverage: 71.793% (-0.7%) from 72.492%
24904

Pull #958

circleci

edwh
perf(markseen): batch the "mark seen" inserts (Galera-safe) instead of one INSERT per post

"Mark seen" on Browse ran one INSERT ... ON DUPLICATE KEY UPDATE per message id, so it scaled
linearly with the unread count - one DB round-trip per post. Batch the inserts into multi-row
statements (chunk 100): a mark-seen of N posts is now ~ceil(N/100) round-trips. Per-message
semantics are unchanged (ON DUPLICATE KEY UPDATE is per conflicting row).

Galera (Percona XtraDB Cluster) safety - a multi-row INSERT is one transaction, so a
certification conflict rolls back the whole statement (unlike the old per-row loop):
- Moderate chunk (100) bounds the rollback blast radius and lock footprint.
- Sort + de-dupe the ids so concurrent same-user mark-seens lock rows in a consistent order
  (no deadlock from opposite orderings) and a repeated id can't collide with itself in one
  statement.
- database.RetryExec retries transient connection/WSREP errors.
- Per-row fallback on deadlock/lock-timeout: a conflicting chunk degrades to per-row inserts
  (each its own tiny autocommit txn, the old behaviour) so the rest still land.

Follow-up (separate, larger): make mark-seen O(1) via a per-user, per-view high-water mark and
move the per-item View writes (needed for view-counts, dedup, the rippling underexposure score)
to the background_tasks queue.

Go suite green (3385/0): new TestMessagesMarkSeenBatchPreservesSemantics + TestDedupeSortedIDs;
existing markseen tests unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ZeG2zmg2JCR8pYEjAUaAk
Pull Request #958: perf(markseen): batch "mark seen" inserts (Galera-safe) so it stops scaling per post

12353 of 16327 branches covered (75.66%)

Branch coverage included in aggregate %.

53 of 59 new or added lines in 1 file covered. (89.83%)

131262 of 183713 relevant lines covered (71.45%)

38.09 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
92.59
-7.41% iznik-server-go/message/markseen.go
Jobs
ID Job ID Ran Files Coverage
24904 playwright - 24904 05 Jul 2026 08:37AM UTC 74
22.74
CircleCI Job 24904
24904 go - 24904 05 Jul 2026 08:37AM UTC 145
84.05
CircleCI Job 24904
24904 vitest - 24904 05 Jul 2026 08:37AM UTC 747
69.52
CircleCI Job 24904
24904 laravel - 24904 05 Jul 2026 08:37AM UTC 477
68.81
CircleCI Job 24904
Source Files on build 24904
  • Tree
  • List 1370
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • CircleCI Build #24904
  • Pull Request #958
  • PR Base - master (#24895)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc