mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
49464342fd
Summary: The change is in theory not necessary. However it improves the reliability on OS crashes a bit, and can potentially workaround some bugs in filesystems (as we saw in production where the atomic-written files are empty and the system didn't crash). The idea is, the `symlink` syscall does the file creation and "content" writing together, while there is no way to create a file and write specific content in one syscall. Note that the C symlink call uses 0-terminated string, and the Rust stdlib exports it as accepting `Path`. To be safe, we encode binary or non-utf8 content using `hex`. For downgrade safety, the write path does not use symlink by default unless format.use-symlink-atomic-write is set to true. This makes downgrade possible: the read path is rolled out first, then we can turn on and off the write path. The indexedlog Rust unit tests and test-doctor.t are migrated to use the new symlink code paths. Reviewed By: DurhamG Differential Revision: D20153864 fbshipit-source-id: c31bd4287a8d29575180fbcf7227d2b04c4c1252 |
||
---|---|---|
.. | ||
benchmarks | ||
cli | ||
docs | ||
fs | ||
integration | ||
locale | ||
mononoke | ||
py | ||
scm | ||
scripts | ||
test_support | ||
test-data | ||
third-party | ||
win | ||
.gitignore | ||
Eden.project.toml |