v8.64.0 - Hybrid Sync Race Condition Fix
🔄 Tombstone Support for Multi-Device Sync
Problem Fixed: Memories deleted on one device were reappearing after syncing from another device.
Root Cause: No tombstone records - when a memory was deleted locally, another device's sync would pull it back from cloud as "missing".
Changes
- Soft-Delete with Tombstones -
delete()now setsdeleted_attimestamp instead of removing rows - Tombstone Check in Sync - Before syncing "missing" memory from cloud, checks if it was deleted locally
- Automatic Purge - BackgroundSyncService runs daily cleanup of tombstones older than 30 days
- Schema Migration - New
deleted_atcolumn automatically added on startup
Technical Details
| Component | Changes |
|---|---|
sqlite_vec.py
| Soft-delete, is_deleted(), purge_deleted(), updated SELECT queries
|
hybrid.py
| Tombstone check in sync loop, purge scheduler |
base.py
| Added is_deleted() and purge_deleted() default methods
|
Configuration
TOMBSTONE_RETENTION_DAYS- Days to keep tombstones before purging (default: 30)
Test Results
- ✅ 34/34 SQLite-vec storage tests pass
- ✅ 19/19 hybrid storage tests pass
Installation
pip install --upgrade mcp-memory-service
# or
uv pip install --upgrade mcp-memory-serviceBreaking Changes
None - tombstone support is backward compatible. The schema migration runs automatically on first startup.
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com