2 ms·
Looks like LiteFS invalidates the cached file contents on every update of position. This means there is never stale data to be read. (The client needs to make
by yencabulator 4y ago
Looks like LiteFS invalidates the cached file contents on every update of position. This means there is never stale data to be read.
(The client needs to make sure to consume that in a single pread/read syscall, or it could observe a sheared state.)
Disclaimer: I wrote the FUSE framework LiteFS uses, https://bazil.org/fuse https://bazil.org/fuse
https://github.com/superfly/litefs/blob/52e269d4b04070690ce2757e568d320ae631d7fe/db.go#L121 https://github.com/superfly/litefs/blob/52e269d4b04070690ce2...
https://github.com/superfly/litefs/blob/52e269d4b04070690ce2757e568d320ae631d7fe/fuse/file_system.go#L136 https://github.com/superfly/litefs/blob/52e269d4b04070690ce2...
https://github.com/superfly/litefs/blob/a5cf33d1a3a91873d4ad291e6e63c94a8488084d/fuse/pos_node.go#L49 https://github.com/superfly/litefs/blob/a5cf33d1a3a91873d4ad...
- ngrilly 4y agoVery clear. Thanks for the great explanation.