Repository navigation
Conversation
Explain that RocksDB commits write to Harper's transaction log in the OS page cache without calling fsync (with RocksDB's own WAL disabled) and rely on replication confirmation for durability across OS, power, or host failures. Mark storage.writeAsync as LMDB-only and update the storage algorithm and tuning pages accordingly. Refs HarperFast/harper#3243 Dispatch-Task: docs-no-fsync-durability Co-Authored-By: Gemini <noreply@google.com>
Qualify that process-crash recovery on RocksDB requires the transaction log to be enabled (the default via logging.auditLog: true and @table(audit: true)), distinguish replication confirmation from replicateTo residency, note failure domain and single-node constraints, correct logging.auditLog default to true in options.md, and update the Storage Algorithm summary in database/overview.md. Refs HarperFast/harper#3243 Dispatch-Task: docs-no-fsync-durability Co-Authored-By: Gemini <noreply@google.com>
…onfirmation Document X-Replicate-To: *;confirm=<k> in storage-tuning.md and sharding.md so REST clients can require peer confirmation without pinning residency to a fixed node list, note the interaction with replication.replicateTo when omitting replicateTo, and explicitly note that replication requires Harper Pro. Refs HarperFast/harper#3243 Dispatch-Task: docs-no-fsync-durability Co-Authored-By: Gemini <noreply@google.com>
…bases[].replicateTo Note in storage-tuning.md that replication confirmation counts any <k> responding peers (so <k> must exceed the number of peers in the writer's failure domain to survive a site-wide failure), and reference per-database replication.databases[].replicateTo in storage-tuning.md and sharding.md. Refs HarperFast/harper#3243 Dispatch-Task: docs-no-fsync-durability Co-Authored-By: Gemini <noreply@google.com>
…ist behavior Include system in the replication.databases example in sharding.md, note that setting replication.databases to a list replaces the '*' default, and list replicateTo in the replication.databases sub-options in options.md. Refs HarperFast/harper#3243 Dispatch-Task: docs-no-fsync-durability Co-Authored-By: Gemini <noreply@google.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the documentation to reflect the transition to RocksDB as the default storage engine, detailing its durability model, transaction log recovery mechanism, and replication confirmation features. It also clarifies that the storage.writeAsync option is legacy and only applies to LMDB, and updates configuration examples for sharding and replication counts. There are no review comments, so I have no feedback to provide.
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-733 This preview will update automatically when you push new commits. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
⊙ Problem
Several v5 reference pages state or imply that Harper calls
fsyncon every commit on RocksDB (the default storage engine), that RocksDB's WAL persists committed writes, and thatstorage.writeAsyncdisablesfsyncon RocksDB. In reality, Harper disables RocksDB's WAL for table stores. It writes commits to its own transaction log in the OS page cache, without callingfsync.storage.writeAsyncapplies only to LMDB.🤔 Should the docs state plainly that RocksDB commits are not
fsynced by default and rely on replication confirmation for host-failure durability?Yes, as specified in HarperFast/harper#3243 (
durability-via-replication-position). Documenting the actual commit path stops operators from assuming single-node disk-sync durability or settingstorage.writeAsyncon RocksDB. It directs multi-node Harper Pro deployments to peer replication confirmation (replicatedConfirmation/X-Replicate-To: *;confirm=<k>).💡 Solution
## Durability vs. Throughputinstorage-tuning.mdcovering what an acknowledged RocksDB write survives (process crashes via transaction-log replay) and does not (host/OS/power failure before OS flush), and how peer replication confirmation provides cross-host durability.storage-algorithm.mdand markstorage.writeAsyncas LMDB-only (<EngineBadge engines="LMDB" />) instorage-tuning.mdandoptions.md.logging.auditLogdefault (true) andreplication.databases[].replicateToinoptions.mdandsharding.md, and update the Storage Algorithm card summary inoverview.md.🔧 Changes
reference/database/storage-tuning.md—## Durability vs. Throughputcovering the RocksDB transaction log (database/<db>/transaction_logs/), OS page-cache writeback, andreplicatedConfirmation/X-Replicate-To: *;confirm=<k>failure-domain guidance, adds<EngineBadge engines="LMDB" />onstorage.writeAsync, and updates the write-heavy and durability-critical workload recipes.reference/database/storage-algorithm.md— qualifies the opening ACID statement, updates the Durability bullet, and replaces the RocksDB WAL bullet with transaction-log replay in the OS page cache when transaction logging is enabled (logging.auditLog: trueand@table(audit: true)).reference/configuration/options.md— fixeslogging.auditLogdefault fromfalsetotrueand its reference table entry, documentsreplicateTounderreplication.databasesentries, and marksstorage.writeAsyncas<EngineBadge engines="LMDB" />.reference/replication/sharding.md— updates thereplicateToprose andreplication.databasesconfig example (withsystemincluded alongsidedata), and usesX-Replicate-To: *;confirm=1in the REST confirmation example.reference/database/overview.md— updates the Storage Algorithm card summary from LMDB-only wording to "RocksDB (or legacy LMDB)".🤔 Should we name the on-disk
database/<db>/transaction_logs/path andX-Replicate-To: *;confirm=<k>syntax (expose-txnlog-path,document-star-header)?Yes. Naming
database/<db>/transaction_logs/shows the concrete directory operators see under the root path rather than an abstract reference to the transaction log. DocumentingX-Replicate-To: *;confirm=<k>(server/REST.ts:278) lets REST callers request confirmation without pinning residency to a numericreplicateTocount.🤔 Should
replicateToconfiguration examples usereplication.databases[].replicateTo(docs-follow-code-for-replicateto)?Yes. Harper core reads
replicateTofrom eachreplication.databasesentry (resources/Table.ts:1496-1503). The example includessystembecause overriding the default'*'allowlist would otherwise silently turn offsystemdatabase replication.✅ Verification
npm run format:writeandnpm run format:check(clean across the repository).npm run build(clean production Docusaurus build across all 410 docs and versioned v4 docs with zero broken links or anchors).Refs HarperFast/harper#3243
🤖 Generated by Google Gemini; posted via @kriszyp.
Related PRs: #723 overlaps (both edit reference/replication/sharding.md REST header section), 2 others independent
Complexity: medium
Origin — the dispatch brief this PR was written from
Correct Harper's v5 documentation so that it states plainly that Harper does NOT fsync commits on the RocksDB storage engine (the default), does not plan to by default, and that durability against machine/OS/power failure comes from replication confirmation, not disk sync. Today several pages say or imply that commits are fsynced by default and that
storage.writeAsync: trueis what turns fsync off. That is wrong for RocksDB.Acceptance
Dispatch: task
docs-no-fsync-durability· queued by kriszyp-session · ran by gemini/gemini-4-argon-high/low · worker kzyp-xps-1Review-Coverage: authored=gemini; ran=claude; adjudicated=domain; declined=cursor-grok,cursor-composer,cursor-kimi,cursor-muse,muse; rounds=5; full=1 @ 8996b50
Review-Attention: skim ~2m (decisions: durability-via-replication-position, expose-txnlog-path, document-star-header, docs-follow-code-for-replicateto) @ 8996b50