Skip to content

docs(analytics): document transaction-commit-time metric - #572

Open
kriszyp wants to merge 9 commits into
mainfrom
kris/txn-commit-latency-592
Open

docs(analytics): document transaction-commit-time metric#572
kriszyp wants to merge 9 commits into
mainfrom
kris/txn-commit-latency-592

Conversation

@kriszyp

@kriszyp kriszyp commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

Adds a Storage Metrics section documenting transaction-commit-time (write commit submit→durable duration distribution) and how its upper percentiles serve as the leading indicator for the storage overload (503) rejection.

Purpose

Companion docs for HarperFast/harper#1688 (harper#592).

Generated by Claude Opus 4.8.

Add a Storage Metrics section documenting transaction-commit-time (write commit
submit->durable duration distribution) and how its upper percentiles serve as the
leading indicator for the storage overload (503) rejection.

Companion to harper#592.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-572

This preview will update automatically when you push new commits.

@github-actions
github-actions Bot temporarily deployed to pr-572 July 7, 2026 15:50 Inactive

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds documentation for a new transaction-commit-time storage metric in reference/analytics/overview.md, detailing its distribution and its relationship with the overload guard configuration. The feedback suggests correcting a grammatical typo in the documented error message and adding backticks around a configuration parameter for markdown consistency.

Comment thread reference/analytics/overview.md Outdated
Comment thread reference/analytics/overview.md Outdated
@github-actions
github-actions Bot temporarily deployed to pr-572 July 7, 2026 16:32 Inactive
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-572

This preview will update automatically when you push new commits.

@kriszyp
kriszyp marked this pull request as ready for review August 1, 2026 00:09
@kriszyp
kriszyp requested a review from a team as a code owner August 1, 2026 00:09
Comment thread reference/analytics/overview.md Outdated
kriszyp and others added 7 commits July 31, 2026 18:38
- Correct transaction-commit-time description: the recorder fires on
  both fulfilment and rejection (submit -> settle), not only on
  durable commit — a failed/retried commit still consumes queue time
  and should not be undercounted.
- Restore the storage. prefix on maxTransactionQueueTime for
  consistency with its earlier mention.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
…tle-only

Cross-model review (codex) flagged the original framing as overstating the
metric's reliability as a leading indicator: it is RocksDB-only, records one
sample per commit attempt (not per logical transaction — conflict retries
each get their own sample), and only records once an attempt settles, so a
wedged commit contributes nothing while still tripping the 503 guard.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
…ding

- median/p90/p95/p99/p999 are only present on the per-minute aggregate
  (hdb_analytics); raw per-second entries only carry mean/distribution/count.
- The overload guard tracks a commit it happened to arm on, not reliably
  the oldest outstanding one (retries/chained commits can wedge unarmed).
- ASCII "to" instead of the arrow glyph per the content style guide.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
… signal

- Add a transaction-commit-time entry to the v5.2 release notes so it's
  discoverable from the changelog.
- Replace the vague "queue-depth or stuck-commit observability" pointer
  (no such metric is documented yet) with the actual overload-guard log
  line operators can watch today.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
…cy-592

# Conflicts:
#	release-notes/v5-lincoln/5.2.md
Cross-model review (codex + grok + harper-domain adjudication) found the
initial framing overstated this metric's reliability as a leading
indicator. Verified each claim against harper's DatabaseTransaction.ts
and analytics/write.ts before applying:

- RocksDB-only; never emitted for LMDB-backed databases.
- One sample per commit attempt, not per logical transaction (conflict
  retries each record their own sample).
- Only records once an attempt settles — a still-outstanding commit
  contributes nothing.
- Raw entries (hdb_raw_analytics) carry mean/distribution/count only;
  percentiles are computed on the per-minute aggregate (hdb_analytics).
  Fixed the page's own raw-entry JSON example, which showed percentile
  fields that don't exist on raw rows.
- The overload guard rejects record updates and publishes only — deletes
  and canonical-source writes (replication, caching sources) bypass it.
- The guard tracks at most one outstanding commit per thread: a retry
  issued while the prior attempt still holds that slot is never armed
  (so a wedge there won't trip the 503); a later backoff-delayed retry
  re-arms fresh.
- Added a v5.2 release-note entry and VersionBadge.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
recordCommitLatency wraps the async transaction.commit() path only;
replayLogs.ts's directCommitSync() calls commitSync() directly and isn't
instrumented, so replay/startup commits emit no sample either.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-572

This preview will update automatically when you push new commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants