diff options
| author | eunhhu <[email protected]> | 2026-09-25 09:33:43 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-25 09:33:43 +0100 |
| commit | 6a28879bd56354483fe940c0c80d511eccb89983 (patch) | |
| tree | ed919d234ea2dbe8099e53fae51e495d8bee984e /prototypes/connections/README.md | |
| parent | 8a65fd032e6f74938caf84d6f6fcda6314e76a01 (diff) | |
| download | pure-6a28879bd56354483fe940c0c80d511eccb89983.tar.gz pure-6a28879bd56354483fe940c0c80d511eccb89983.zip | |
Add selected single-file persistent tree store
store-tree.c keeps every document in one append-only file as a persistent
B-tree of byte extents, with the key catalog in the same structure. A splice
writes only the changed leaf and path; unchanged extents are shared between
versions, readers take no lock, and two alternating head slots publish a
commit after its nodes are durable. Compaction rewrites reachable nodes.
On the recorded ext4 host a durable 1-byte middle insert into a 1 MiB
document took 8.58 ms against 78.51 ms for the default store, and the real
TUI's Ctrl+S after typing took 16.60 ms against 84.59 ms. check-tree runs the
store's crash/oracle tests and the unchanged runtime, splice, async and
real-PTY editor checks on it. It stays opt-in: linked code is 12.7 KB larger
and contiguous multi-leaf reads copy.
Diffstat (limited to 'prototypes/connections/README.md')
| -rw-r--r-- | prototypes/connections/README.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/prototypes/connections/README.md b/prototypes/connections/README.md index 7da7eab..f0b041e 100644 --- a/prototypes/connections/README.md +++ b/prototypes/connections/README.md @@ -144,6 +144,16 @@ python3 prototypes/connections/export_flat_store.py \ [실제 큰·작은 문서 쓰기량과 전체 제한](../../docs/research/034-hybrid-document-storage.md), [기본 형식으로 내보내는 검증](../../docs/research/062-paged-store-rollback.md). +선택형 영속 트리 저장소(`store-tree.c`)는 모든 문서를 추가 전용 파일 하나에 불변 익스텐트 +트리로 둔다. 편집은 바뀐 leaf와 경로만 기록하고, 읽기는 잠그지 않는다. 기존 런타임·부분 수정· +비동기·실제 PTY 검사와 자체 고장·오라클 검사를 함께 실행한다. 형식이 달라 별도 `--store` +디렉터리를 쓴다. [설계·측정·한계](../../docs/research/073-single-file-persistent-tree.md). + +```sh +make -C prototypes/connections check-tree +prototypes/connections/build/tree/pure-edit-tui-fixed --store /tmp/pure-tree-documents note +``` + 같은 `.pure` 문서 편집기를 선택형 페이지 저장소와 함께 터미널에서 사용하려면 새 저장 디렉터리를 지정한다. 논리 페이지는 16 KiB이며 OS 페이지가 이를 나눌 때만 초기화한다. Linux 16 KiB 호스트에서 전체 선택형 검사가 통과했고, |
