Skip to content

perf(openclaw-tps-mail): measure mailbox-lock contention from the aged-nack sweep and obligation writers #536

Closed

Description

@tps-flint

Follow-up from cli#534 (#533).

After cli#534 the aged-nack sweep in plugins/openclaw-tps-mail holds the per-mailbox lock (packages/agent/src/lib/mail-lock.ts) through selection, release, record deletion and receipt deletion, and the obligation writers take the same lock. That lock covers the whole mailbox, including ordinary mail operations, and synchronous obligation writers can wait on it. The sweep skips a busy mailbox, so it cannot stall delivery, but nothing measures how long writers wait.

Measure it: record lock wait and hold times for the sweep and the obligation writers on a busy mailbox (a real-file benchmark with concurrent writers), and report p50/p99. If writers wait more than a few milliseconds at p99, narrow the sweep's critical section or move obligations to their own lock with a documented ordering.

🤖 Generated with Claude Code

Activity

  1. self-assigned this
    on Oct 7, 2026
  2. moved this from Triage to In review in Office queueon Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions