Skip to content

fix: fluree-memory -- fix concurrent mcp use block#1299

Merged
bplatz merged 3 commits into
mainfrom
fix/fluree-memory-concurrency
Jun 10, 2026
Merged

fix: fluree-memory -- fix concurrent mcp use block#1299
bplatz merged 3 commits into
mainfrom
fix/fluree-memory-concurrency

Conversation

@bplatz

@bplatz bplatz commented Jun 7, 2026

Copy link
Copy Markdown
Contributor
  • Move the file-sync rebuild lock wait onto Tokio’s blocking pool so flock cannot block async worker threads.
  • Serialize file-backed memory mutations across both in-process MCP calls and shared store instances.
  • Add a manual concurrent MCP-like add stress example for validating the regression.

… wait off Tokio worker threads.

Concurrent MCP memory_add bursts could block all runtime workers on a synchronous flock while another task held the rebuild lock across awaits, bricking memory. This also protects the Turtle file plus ledger-cache update path from overlapping writes that caused commit conflicts and rebuild storms.
@bplatz bplatz requested review from aaj3f and zonotope June 7, 2026 12:10

@zonotope zonotope left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥍

@bplatz bplatz merged commit e63be51 into main Jun 10, 2026
14 checks passed
@bplatz bplatz deleted the fix/fluree-memory-concurrency branch June 10, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants