Skip to content

Fix the conflict config files shared by VersionedKvStore and NamespacedKvStore - #182

Merged
zhangfengcdt merged 2 commits into
mainfrom
feature/separate-namespace-config-file
May 21, 2026
Merged

Fix the conflict config files shared by VersionedKvStore and NamespacedKvStore#182
zhangfengcdt merged 2 commits into
mainfrom
feature/separate-namespace-config-file

Conversation

@zhangfengcdt

@zhangfengcdt zhangfengcdt commented May 21, 2026

Copy link
Copy Markdown
Owner

Summary

Two prollytree store types — VersionedKvStore and NamespacedKvStore — currently share a single on-disk config file (prolly_config_tree_config) when both are opened against the same dataset directory. Each store writes its own root hash to that file on commit; the last writer wins. A process opening the other store afterwards reads a root hash that points at a tree it can't reconstruct, silently falls back to an empty tree, and every subsequent read returns None.

This PR splits the config file by owner: NamespacedKvStore writes its inner store's TreeConfig to prolly_config_namespaced_root; VersionedKvStore keeps prolly_config_tree_config unchanged. Also fixes NamespacedKvStore::init to be idempotent — it currently appends an "Initial namespaced store" commit to history on every call, even for already-initialized stores.

@zhangfengcdt
zhangfengcdt merged commit 7efec72 into main May 21, 2026
10 checks passed
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.

1 participant