HarperFast / HarperFast/harper-pro

replicateTo update deletes record on non-target node

Open
#212 1 comment 0 reactions 0 assignees View on GitHub
area:replication bug duplicate from-jira
Dominant language
JavaScript
Stars
3
Forks
0
Avg merge
1d 21h
Merged PRs (30d)
80

Description

## Problem

Performing an `update` on node1 with `replicateTo: [node2]` causes the record to be **deleted** from node3 (which was not a replication target).

## Steps to reproduce

1. 3-node cluster; create a blob record `id=3` replicated to all nodes
2. Update on node1, targeting only node2:
```json
{ "operation": "update", "schema": "blob", "table": "BlobTable",
"records": [{ "id": "3", "data": null }], "replicateTo": ["127.0.0.2"] }
```
3. On node3, query with `replicateFrom: false` via `search_by_value`:
```json
{ "operation": "search_by_value", "replicateFrom": false, "schema": "blob",
"table": "BlobTable", "search_attribute": "id", "search_value": "*", "get_attributes": ["*"] }
```

## Expected

Node3 returns original record — it was not a replication target.

## Actual

Node3 returns `[]` — the record no longer exists locally.

Related: CORE-2748 (same bug triggered by SQL SELECT first), CORE-2749 (X-Replicate-From: none not respected).

🤖 Filed by Claude on behalf of Kris.

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.