Repository navigation
Document replicaExpiration and replicaRefreshFraction for residency tables - #746
Conversation
…ables Dispatch-Task: hp-residency-replica-tier Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JxKx7SjhcDpWXLNcydYC7g
…hor, and note the 5.4 change Dispatch-Task: hp-residency-replica-tier Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JxKx7SjhcDpWXLNcydYC7g
Dispatch-Task: hp-residency-replica-tier Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JxKx7SjhcDpWXLNcydYC7g
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-746 This preview will update automatically when you push new commits. |
There was a problem hiding this comment.
Code Review
This pull request adds documentation and release notes for local replicas of records fetched from other nodes in v5.4.0, introducing the new @table arguments replicaExpiration and replicaRefreshFraction. The feedback suggests avoiding the use of the <VersionBadge> component at the start of a paragraph in running prose within reference/replication/sharding.md, recommending plain text instead.
| With this approach, record metadata (including residency information) and indexed properties are replicated to all nodes, but the full record is only stored on the specified nodes. | ||
| With this approach, record metadata (including residency information) and indexed properties are replicated to all nodes, but the full record is only stored on the specified nodes, apart from the short-lived replicas described next. | ||
|
|
||
| <VersionBadge type="changed" version="v5.4.0" /> A node outside a record's residency that reads the record fetches it from a resident node and keeps the result as a local replica for `replicaExpiration` seconds (default one hour), renewed by reads after `replicaRefreshFraction` of that time. The record stays where the residency function placed it: a replica is never written back, replicated onward or counted as a resident, and a resident's write turns it back into a stub so the next read fetches the new version. See the [`@table` arguments](../database/schema.md#replicaexpiration-and-replicarefreshfraction). |
There was a problem hiding this comment.
Avoid using the <VersionBadge> component at the start of a paragraph in running prose. Use plain text (e.g., 'As of vX.Y.Z') instead, reserving <VersionBadge> for standalone placement after headings.
| <VersionBadge type="changed" version="v5.4.0" /> A node outside a record's residency that reads the record fetches it from a resident node and keeps the result as a local replica for `replicaExpiration` seconds (default one hour), renewed by reads after `replicaRefreshFraction` of that time. The record stays where the residency function placed it: a replica is never written back, replicated onward or counted as a resident, and a resident's write turns it back into a stub so the next read fetches the new version. See the [`@table` arguments](../database/schema.md#replicaexpiration-and-replicarefreshfraction). | |
| As of v5.4.0, a node outside a record's residency that reads the record fetches it from a resident node and keeps the result as a local replica for `replicaExpiration` seconds (default one hour), renewed by reads after `replicaRefreshFraction` of that time. The record stays where the residency function placed it: a replica is never written back, replicated onward or counted as a resident, and a resident's write turns it back into a stub so the next read fetches the new version. See the [`@table` arguments](../database/schema.md#replicaexpiration-and-replicarefreshfraction). |
References
- Avoid using the component at the start of a paragraph in running prose. Use plain text (e.g., 'As of vX.Y.Z') instead, reserving for standalone placement after headings.
LMDB remote reads remain proxy reads and never arm replica maintenance. Match the Float schema argument and explain the sweep interval floor. Dispatch-Task: harper-3375-audit-refs-regression Co-Authored-By: GPT-5 Codex <noreply@openai.com>
|
Updated this companion in fa903ea for the RocksDB-only contract in harper#3375.
Keep this PR draft and coordinate publication with core #3375 and harper-pro#1101. The previous review footer covers the prior docs revision; this update has not had a separate outside-model docs review. 🤖 Generated by OpenAI Codex; posted via @kriszyp. |
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-746 This preview will update automatically when you push new commits. |
Reload RocksDB workers after changing replica settings; existing classes can retain their previous values. Disabling admission does not purge old replicas. Dispatch-Task: harper-3375-audit-refs-regression Co-Authored-By: GPT-5 Codex <noreply@openai.com>
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-746 This preview will update automatically when you push new commits. |
Dispatch-Task: harper-3375-audit-refs-regression Co-Authored-By: GPT-5 Codex <noreply@openai.com>
|
Updated the schema reference in 75abed5 to match the live option-propagation repair in harper#3375. Schema rescans apply replica options to already-loaded worker classes. New lifetimes apply to subsequent admissions and renewals; existing deadlines are not rewritten. Lifetime zero stops new admissions and the sweep without purging existing replicas. The obsolete worker-reload warning is removed. Replicas remain RocksDB-only; LMDB remains proxy-only after every update. Full-tree format:write/check passes with the pinned docs formatter. Core’s real two-worker tests pass on Node 22/24/26 and both engines. No local docs site build or separate outside-model review of this prose revision was run. Keep this companion draft and merge it with core #3375 and harper-pro#1101. 🤖 Generated by OpenAI Codex; posted via @kriszyp. |
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-746 This preview will update automatically when you push new commits. |
Dispatch-Task: harper-3375-audit-refs-regression Co-Authored-By: GPT-5 Codex <noreply@openai.com>
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-746 This preview will update automatically when you push new commits. |
📝 Summary
Documents the two
@tablearguments the local replica tier adds for tables sharded withsetResidency:replicaExpiration(seconds a record fetched from a resident node is kept locally; default 3600;0keeps remote reads) andreplicaRefreshFraction(the share of that lifetime after which a read renews it; default 0.5;1is fixed). The sharding page says what a replica is and is not, thatsetResidencyByIdtables keep none, and thatreplicateFrom: falsereturns a replica the node holds; the 5.4 release notes get an entry; the argument section explains the lifetime, the sweep and the renewal.Companion to HarperFast/harper#3375 and HarperFast/harper-pro#1101 (the feature; this page should merge with them). Open PR #691 adds a row to the same
@tabletable; whichever merges second keeps both rows.🤖 Generated by Claude Fable 5.1; posted via @kriszyp.
Release target: main — documentation for the 5.4 replica tier
Related PRs: #691 overlaps
Complexity: simple
Review-Coverage: authored=claude; ran=gemini,cursor-composer,codex; adjudicated=domain; declined=cursor-grok,cursor-kimi,cursor-muse,muse; rounds=2; full=1 @ 5b20880
Review-Attention: skim ~2m (decisions: default-on-replicas, ship-docs-before-feature-tag) @ 5b20880