ColinLeeo commented on issue #1054:
URL: https://github.com/apache/tsfile/issues/1054#issuecomment-6792511438

   Verified against the current code and a real cross-host NFS mount (macOS 
client ← Ubuntu 20.04 `nfs-kernel-server`). Summary:
   
   **Reading over an NFS mount works with the default `PREAD` backend.** Wrote 
a TsFile on the NFS mount and read it back with `PREAD` / `MMAP` / `AUTO` — all 
three returned identical rows. No code changes are needed; `PREAD` is already 
the default backend.
   
   **The mmap SIGBUS risk is on the index side, not the data side.** 
`LocalRandomAccessReadFile` maps the TsFile data with `MAP_PRIVATE` — 
truncate-while-mapped is snapshot semantics on macOS (no SIGBUS, reads old 
bytes; Linux may differ). `MappedDatasetIndex` maps the sidecar index with 
`MAP_SHARED` — truncate-while-mapped does SIGBUS. The recommendation stays: 
force `PREAD` on NFS, avoid `MMAP`/`AUTO`.
   
   **Replace/append while a reader is open is safe.** The open reader keeps 
reading its old view (close-to-open snapshot), no crash.
   
   **More importantly, you don't need the NFS mount to read a remote TsFile at 
all.** The Python reader already accepts a seekable file object 
(`seek`/`tell`/`read`) via the #930 remote random-access path, and TsFile reads 
are offset-based (footer → metadata → only the needed chunks):
   
   ```python
   import fsspec
   from tsfile import TsFileReader
   
   f = fsspec.open("ssh://host/path/to/file.tsfile", "rb").open()
   with TsFileReader(f) as r:
       ...  # normal query
   ```
   
   This reads only the required byte ranges — no full-file download, no mount, 
no `nfsd`/`/etc/exports`.
   
   Happy to follow up with the doc note and the env-gated `TSFILE_NFS_TEST_DIR` 
read-matrix harness proposed above.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to