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

Freegle / Iznik / 24904 / 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
Files 74
Run time 2s
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: 22.742%. Remained the same
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

574 of 2797 branches covered (20.52%)

Branch coverage included in aggregate %.

355 of 1288 relevant lines covered (27.56%)

13.19 hits per line

Source Files on job playwright - 24904
  • Tree
  • List 74
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 24904
  • CircleCI Build #24904
  • e6ea6ff9 on github
  • Prev Job for on perf/markseen-batch (#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