Repository navigation
Port FS byte-range file locks to current upstream main (stage 5b) - #201
Merged
bedipritpal merged 7 commits intoNov 21, 2026
Merged
Conversation
…T; native same-handle IO and process proofs
…ranges; exercise two-client WAIT
… changes the working directory, so the check is independent of how the test binary was invoked
…o cmd.exe accepts it
…exe, matching the holder spawn
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.
What
Remote filesystem byte-range locks on the stage 5a file transport framework: AdsFLock/AdsFUnlock/AdsFLockTest plus oads_* twins and .def entries. Harbour semantics: shared/exclusive; client-side WAIT (one non-blocking OS attempt per server request, client retries every 10 ms); per-owner merged range registry with adjacent merge and partial unlock/split; no recursive re-lock. Each client connection is a separate lock owner, like a separate Harbour process (POSIX OFD locks). A real second process (fs_lock85_probe) holds a range while WAIT completes after its exit, without blocking the server thread. Design note: contrib/oads_hb/FILE_LOCKS_MTFIX85.txt. File byte locks, not RDD record locks; no RDD/CDX lock code changes.
Security (existing, reused)
EnableFileFunc gate and resolve_fs_client_path jail unchanged from 5a. Server lock attempts never sleep; WAIT polling is client-side, holding no file/connection/registry mutexes between requests.
Port
Three commits cherry-ported from the fork's tested mtfix85 line, messages/author dates preserved: byte locks + WAIT + native same-handle IO; Harbour range/PID alignment + HB_DISK constants; separate remote lock owners + two-client WAIT. One forward-only test fix: probe path resolved before the embedded round trip's cwd change (invocation-independent). Adaptations: tests/CMakeLists.txt registers only this stage's probe; three wire_caller lines became arc2_trace (tracing is a later stage).
Tests
+153 lines: shared/exclusive, WAIT, owner separation, merge/split, two-client WAIT; lock-extended remote round trip with a real holder process; new fs_lock85_process. Local (Linux 2GB, gcc -O1 workaround; no local Windows/macOS/clang proof): ctest 9/9 (soak excluded) x2 runs; oads_* suite 19/19, 514 assertions, both invocation modes. One interim run had a single openads_unit_tests failure; case not captured, not reproduced in two later runs; unexplained, no baseline attribution. Fork CI review (ninja-clang+TLS) green, ctest 9/9 + explicit step 19/19: https://github.com/bedipritpal/OpenADS/actions/runs/44878532495
Validation
This parent port has automated coverage only (see Tests). The owner tested fork mtfix88 file operations through the Harbour OAds_vf* wrappers in B_BIG and reported most working; that is not individual certification of every function or of this port.
Out of scope
Later stages (vf front end/driver + conformance, diagnostics, hardening, packaging) as separate PRs