HarperFast / HarperFast/harper-pro

test(replication): cover v5→v4 (reverse-direction) propagation — the rollback-safety axis

Open
#298 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3
Forks
0
Avg merge
1d 21h
Merged PRs (30d)
80

Description

## Gap

`integrationTests/cluster/replicationTopology.test.mjs` covers the v4→v5 direction only: writes originate on the v4 legacy node and are asserted on the v5 nodes. The file's own comment scopes *"bidirectional replication (rollback safety)"*, but no test writes on a **v5** node and verifies the change reaches the **v4** peer.

This is the direction the migration runbook ([Confluence 767459331](https://harperdb.atlassian.net/wiki/spaces/SD/pages/767459331) §6) calls the rollback path — and it's currently unverified, so we don't actually know whether a roll-back-to-v4 after partial cutover would carry v5-originated writes.

## Acceptance

With a v4 legacy node bridged into a v5 cluster (reuse the existing legacy fixture + `HARPER_LEGACY_VERSION_PATH`):
- Write / update / delete on a **v5** node; assert the change propagates to the v4 node (record present, value correct, delete observed).
- Specifically cover the **non-bridge v5 leaf → v4** hop (originate the write on a v5 node that is *not* the bridge node), since that is the path most likely to break.
- Assert convergence in both directions after a mixed sequence of writes.

## Basis / refs

- Extends `integrationTests/cluster/replicationTopology.test.mjs` (legacy-node section); see `addNodeFullCopy.test.mjs`, `excludeTablesReplication.test.mjs`.
- V5 Integration Test Plan — Cat 13 ([785547267](https://harperdb.atlassian.net/wiki/spaces/SD/pages/785547267)).
- Parent V5 Upgrade Testing Plan ([730300417](https://harperdb.atlassian.net/wiki/spaces/SD/pages/730300417)); migration runbook §6 (767459331).

Scoped to a single PR.

---
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.