Skip to content

rclone bisync reads stale content from Tigris edge cache for non-US users #548

@phernandez

Description

@phernandez

Problem

Users outside the US (e.g., Europe) get stale file content when running bm project bisync because Tigris object storage uses eventual consistency globally by default. The tenant's data is stored in iad (US East), and reads from other regions hit edge-cached copies that may be outdated.

Symptoms

  • rclone cat returns old content (e.g., 2048 bytes) while the actual S3 object is current (e.g., 8257 bytes)
  • bm project bisync --resync reports "No changes found" even though files were updated via MCP or the web app
  • Same credentials, same bucket, same path — different content depending on geographic location

Root Cause

Tigris provides strict read-after-write consistency within the same region but only eventual consistency globally. Reads from edge nodes outside the origin region (iad) can return stale cached content.

Tigris supports a X-Tigris-Consistent: true request header to force global strong consistency on a per-request basis: https://www.tigrisdata.com/docs/objects/consistency/

Fix

Add X-Tigris-Consistent: true header to rclone commands in rclone_commands.py. rclone's S3 backend supports custom headers via the --header-download and --header-upload flags:

--header-download "X-Tigris-Consistent: true"
--header-upload "X-Tigris-Consistent: true"

These should be added to project_bisync(), project_sync(), project_check(), and project_ls() in src/basic_memory/cli/commands/cloud/rclone_commands.py.

Also related

get_rclone_config_path() in rclone_config.py hardcodes ~/.config/rclone/ which doesn't match the actual rclone config location on Windows when installed via Scoop or Chocolatey. Should use rclone config file for runtime discovery. (See separate support case — two users hit this independently.)

Affected Users

  • Any user outside the US syncing via rclone
  • Confirmed with a user in Germany getting stale reads consistently

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions