Skip to content

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

@kriszyp

Description

@kriszyp

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: <node2> (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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:replicationReplication, cluster sync, peer connectionsbugSomething isn't workingfrom-jiraMigrated or originated from a Jira ticket

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions