Repository navigation
Test that a replica keeps a row written after an expiring row in the same transaction - #1410
Draft
DavidCockerill wants to merge 4 commits into
Draft
DavidCockerill wants to merge 4 commits into
DavidCockerill wants to merge 4 commits into
Conversation
…same transaction Two nodes; one request writes Exp (table expiration 5 s) and then Plain in one transaction, another the reverse. After Exp expires on B, B still has both Plain rows. Fails with core before HarperFast/harper#4391, where the replica gave Plain the Exp row's expiry and hid it. Refs #1399 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A source-applied write takes only its own expiry (HarperFast/harper#4390). Re-point to the merge commit once that PR lands. Refs #1399 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #1399 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… read errors distinct A per-record error read as 0 could pass for an expired row and end the expiry wait before any expiry. Also check the origin's row written before Exp. Refs #1399 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been 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.
📝 Summary
Adds a two-node test for HarperFast/harper#4391. That fix stops a replica from using an earlier row's expiry in the same transaction (HarperFast/harper#4390). The wrong expiry made the replica hide the row while the origin kept it. This PR also bumps
coreto that fix, so the test runs against it.Closes #1399
🔧 Changes
coremoves to harper#4391's head57b90174d. It containsmain's pin4f20ed583, so nothing rolls back. Once harper#4391 merges,coremoves to its merge commit.✅ Verification
replicatedWriteOwnExpiry.test.mjs, with its fixture (schema, two one-transaction resources, config): one request writesExp(expiration: 5) and thenPlainin one transaction, another the reverse. OnceExpexpires on B, B still has bothPlainrows. Withcoreatmain's pin, B loses the row written afterExp; with thiscoreit passes in every run.typecheck,lint:requiredand format pass.test:unithas 3 failures, all identical withcoreatmain's pin (/procand the/varsymlink on macOS). The new test,addNodeTableExpirationandcacheReplicationSourcepass together locally; CI runs the full cluster and non-cluster tiers.Exprows on B first, and a read error counts as neither 0 nor 1 (the final round's finding), not re-reviewed.corebump whose behavior change is harper#4391's🤖 Generated by Claude Code (Anthropic Claude Opus); posted via @DavidCockerill.
Release target: v5.4 — ships with harper#4391's fix, milestoned v5.4
Depends-on: HarperFast/harper#4391
Related PRs: #1395 independent (the core sync this branch builds on)
Complexity: easy
Deferred findings
20189ba273efa47bminor performance —core— No Performance statement for per-write expiry selection on replication apply path brought in by core bump — NOT FILED7d37570d95d95fb8nit data-integrity —core— Fix might split an origin transaction into per-event replica transactions, breaking crash atomicity — NOT FILEDReview-Coverage: authored=claude; ran=gemini,codex,gemini-carbon; late=gemini-carbon:adjudicated; adjudicated=domain; declined=cursor-grok,cursor-composer,muse; rounds=2; full=2 @ b87c394
Review-Attention: skim ~2m (decisions: cluster-test-vs-unit-only) @ b87c394