{{ message }}
Feat: Declare concurrency scope and data-plane contracts on storage ABCs (collection registry stack 4/5) - #1531
Closed
edwinyyyu wants to merge 2 commits into
Closed
Feat: Declare concurrency scope and data-plane contracts on storage ABCs (collection registry stack 4/5)#1531edwinyyyu wants to merge 2 commits into
edwinyyyu wants to merge 2 commits into
Conversation
edwinyyyu
force-pushed
the
feat/concurrency-scope
branch
3 times, most recently
from
August 27, 2026 17:27
ef1bae0 to
dda78a0
Compare
edwinyyyu
force-pushed
the
feat/concurrency-scope
branch
11 times, most recently
from
August 28, 2026 00:25
e08744b to
bc5e69f
Compare
edwinyyyu
force-pushed
the
feat/concurrency-scope
branch
from
August 28, 2026 00:50
bc5e69f to
452fbab
Compare
11 tasks
edwinyyyu
force-pushed
the
feat/concurrency-scope
branch
3 times, most recently
from
August 31, 2026 22:44
25d78a3 to
8e1021e
Compare
edwinyyyu
force-pushed
the
feat/concurrency-scope
branch
from
September 1, 2026 22:19
8e1021e to
aaf8011
Compare
edwinyyyu
added a commit
to edwinyyyu/MemMachine
that referenced
this pull request
Sep 3, 2026
Adopt MemMachine#1531's ConcurrencyScope: every component computes its scope from its params, a composition's scope is the minimum of its parts', the deployment declares the scope it runs at, and startup refuses any component narrower than that. The horizontal scaling requirement is stated at cluster scope; the SQLite stores declare process or machine and are held to every contract within it. Scope declarations are tabulated, the file lock is named as what gives SQLite-backed stores machine scope, and "large deployment" wording is replaced by scope. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MbYdqGZsuws6Z2WHYfCCR5
edwinyyyu
added a commit
to edwinyyyu/MemMachine
that referenced
this pull request
Sep 3, 2026
…as reference Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MbYdqGZsuws6Z2WHYfCCR5
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
edwinyyyu
force-pushed
the
feat/concurrency-scope
branch
from
September 3, 2026 16:57
aaf8011 to
e832fae
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Purpose of the change
Make the multi-process capability from #1526/#1527 reachable through the API contract. After those PRs, QdrantVectorStore supports multiple processes managing the same collections — but the
VectorStoreABC still said a collection "must be managed by at most one process at a time", so no consumer was permitted to rely on it. This PR replaces that blanket sentence with a declared, per-instance concurrency scope, and states the data-plane contracts that multi-process consumers need to know (#1525).Stacked on the open-or-create removal PR; only the last commit is new to this PR.
Description
ConcurrencyScope(common/data_types.py):PROCESS < MACHINE < CLUSTER— the widest deployment boundary within which concurrent instances of a component may safely manage the same resources. AnIntEnum, ordered by breadth, so the effective scope of a composed system is theminof its parts' scopes.Declared on the ABCs —
VectorStore,SegmentStore, andCollectionRegistrygain an abstractconcurrency_scopeproperty, and the one-process-per-collection/partition sentences are rewritten to defer to it: concurrent management of the same collection/partition is safe within the declared scope; beyond it, consumers shard names, as before.Declared by the implementations:
QdrantVectorStoremin(CLUSTER, registry.concurrency_scope)SQLAlchemyCollectionRegistryCLUSTERon PostgreSQL,MACHINEon file-backed SQLiteSQLAlchemySegmentStoreCLUSTERon PostgreSQL,MACHINEon SQLiteMilvusVectorStorePROCESSSQLiteVectorStorePROCESSSQLiteVecVectorStorePROCESSSo a Qdrant store backed by a PostgreSQL registry declares
CLUSTER, and one backed by a shared SQLite file declaresMACHINE— the deployment can introspect what it is allowed to do instead of relying on out-of-band knowledge.Data-plane contracts stated on
VectorStoreCollection(documentation only; both are pre-existing properties that multi-process deployment makes worth stating):Design doc:
design/concurrency_scopes.md.Fixes/Closes
Related to #1525 (contract half of the redesign).
Type of change
(Adding an abstract property is breaking for out-of-tree
VectorStore/SegmentStore/CollectionRegistryimplementations, which must now declare a scope.)How Has This Been Tested?
Scope assertions per implementation: qdrant with a SQLite registry declares
MACHINEand with a PostgreSQL registry (integration) declaresCLUSTER; the SQLAlchemy segment store and config registry assert dialect-based scopes across the sqlite/PG fixture matrix; Milvus and both SQLite stores assertPROCESS.Test Results: 1897 passed (default run); 585 passed (targeted integration run);
ruff check,ruff format --check,ty check packagesclean (no new diagnostics).Checklist
Further comments
Milvus's
PROCESSdeclaration is honest at this point in the stack; the final PR moves Milvus onto the collection registry and widens it tomin(CLUSTER, registry scope).