Repository navigation
kvspace-durable: v0.3.23 ABI alignment, Ptr chain resolution, ctime cache retirement, and volatile ring buffer - #45
Open
carsontung666 wants to merge 13 commits into
Open
carsontung666 wants to merge 13 commits into
carsontung666 wants to merge 13 commits into
Conversation
…nd v0.3.23 New* ABI - ffi: invalidate the full subtree in DelTree/CpTree/CpList (normalizing trailing slash or member separator) - headlenpow: bound langtype_from_wire to data.len() so truncated or malformed attr trailers return None instead of panicking across C ABI - ffi: align kvspaceNew* signatures and wire output with kvspace.h v0.3.23 (write langtype verbatim to attr; reject empty NewPtr target) - remove unused xvalue/backend helpers and update README wire format docs
… atomic fs writes, and SCAN MATCH - redis: drop TCP connection on I/O error or timeout so delayed replies cannot desynchronize subsequent commands - ffi: wrap lazy flush, WriteInPlace readback, and Watch polling in catch_unwind to return 1 instead of aborting across C ABI - fs: overwrite body in place when layout matches, otherwise write a temp file and rename atomically - ffi: add per-handle child list snapshot for ListLen/ListAt - redis: pass escaped MATCH prefix to server-side SCAN
… O(N) Reuse the last list() snapshot in kvspaceListAt while (prefix, expand_ext, resolve) match, idx strictly increases, and no writes occur on the handle. Re-list on ListLen, any handle mutation, or repeated/non-increasing idx so polling callers observe external updates.
Keep a single ListCache snapshot: ListLen always re-lists (cursor = -1), sequential ListAt (idx > cursor) reuses that listing, repeated or non-increasing idx re-lists for external write visibility, and all handle write paths invalidate the cache while retaining catch_unwind guards.
Verify sequential ListAt reuse, immediate invalidation on same-handle mutations (SetValue, Del, DelTree, lazy WriteNewPlace), and cross-handle visibility on repeated idx or ListLen.
…s backends
- unify subtree deletion around store::is_subtree_key(base, key) via subtree_base
- fs: remove sibling runtime-attribute entries in the parent directory, preserve the root directory itself on DelTree("/"), and resolve only parent links so DelTree on a link deletes only the link
- backend (redis/s3): resolve only parent components before checking whether the target key is a link
- tests: add tests/deltree.rs covering fs and Redis
Add deps.json (kvspace v0.3.23) and clone kvspace at that tag when packaging release headers instead of tracking default branch HEAD.
…ped ST_SLACK values - backend, fs: skip validate_ptr during set to support forward, multi-hop, and cyclic pointers without extra synchronous reads; validate attr_len >= 2 and trim trailing padding in kvspaceSetValue - kvspace_common: preserve map key shapes in norm_langtype - xvalue: decode to XValue::None only for canonical ST_SHORT + REF_INLINE + len=0 + empty langtype, and map empty kind to ST_SLACK in to_wire_head so untyped system slots round-trip and work with Watch
…tHead - kvspaceGet, kvspaceWriteInPlace: follow leaf Ptr chains up to 16 hops when resolve != 0 (returning 1 on cycle/hop limit and 0 on dangling target), caching hops so raw and resolved borrowed views coexist - kvspaceGetHead, kvspaceGetPart, kvspaceSetPart: resolve leaf Ptr chains through read_cache and invalidate the terminal target key on mutation
…sion suite - cp.rs, map_coord.rs, common/mod.rs: replace kv.clear() with per-process prefixes + del_tree cleanup and skip cleanly when Redis is unreachable - add tests/review_fixes.rs covering forward/multi-hop/cyclic/>16-hop Ptr chains, WriteInPlace(resolve=1), GetHead/GetPart/SetPart resolution, untyped ST_SLACK round-trip + Watch, and attr trailer bounds - silence compiler warnings across test targets
…handles Detect function ctime control-key updates in volatile_refresh and move cached snapshots under that function directory into retired so cross-handle relayout updates take effect immediately while keeping borrowed pointers valid until Close.
…ildren, and bare-target Ptr listing - ffi: treat /lib/*/vids/* as volatile, retire read_cache across Watch and vids handoff Del, and update VolatileBuf - fs: list directory child without trailing slash only when __self__ exists without __dir__, and preserve trailing directory/member suffix when resolving links to bare targets - backend: preserve trailing directory/member suffix when resolving links to bare targets; add regression cases in tests/review_fixes.rs
… 4 slots Avoid advancing or overwriting live VolatileBuf slots when a volatile control key re-reads identical bytes, preventing use-after-free when multiple borrowed Get and GetHead calls interleave within one instruction.
carsontung666
force-pushed
the
fix/review-v0.3.23
branch
from
November 1, 2026 06:23
9b388bf to
8956464
Compare
miaobyte
added a commit
that referenced
this pull request
Nov 1, 2026
feat: v0.3.23 ABI 对齐与 Ptr/volatile 修复(review #45,冲突取 PR 方)
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.
Summary
fsandredisbackends with v0.3.23 C ABI contracts: up to 16-hop leafPtrresolution, bare-targetPtrdirectory/member listing,DelTreeparity, untypedST_SLACKpreservation, and/lib/*/‥ctimecross-handle cache retirement.Get/BodyView/GetHeadcalls within one instruction never invalidate live views.ListLen/ListAttraversal caching, atomicfswrites, Redis I/O reconnect handling, non-destructive Redis test isolation, anddeps.jsonheader pinning.Verification
cargo test: 51/51 passed (0 warnings).