HarperFast / HarperFast/harper-pro

X-Replicate-From: none not respected for blob GETs — still fetches from remote nodes

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

Description

## Problem

A `GET` request with `X-Replicate-From: none` should only look in the local node's database. However, blob data is returned even when the blob only exists on another node — indicating the `none` flag is not preventing remote fetching.

## Steps to reproduce

1. Set up 3-node cluster
2. Write a blob on node 1 with `X-Replicate-To: ` (so the blob exists on nodes 1 and 2 but NOT node 3)
3. On node 3, GET the blob with `X-Replicate-From: none`

**Expected:** 200 with empty body (blob not present locally on node 3)
**Actual:** 200 with blob data (data retrieved from nodes 1 or 2 despite `none`)

Changing to a non-existent ID returns the expected empty result, suggesting the routing logic fires before the `none` check for blobs that exist elsewhere.

## Likely cause

`Table.ts:3772` guards `ensureLoaded` with `context?.replicateFrom !== false`, but blob fetching may have a separate code path (e.g., in `blob.ts` or a harper-pro sharding layer) that doesn't propagate this context flag.

🤖 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.