[PATCH] D55417: [clangd] Change diskbackedstorage to be atomic

2018-12-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. NIT: I believe we're missing a hyphen in the change description, i.e. it should be `disk-backed`. Comment at: clangd/index/BackgroundIndexStorage.cpp:76 +// Write to a temporary file first. +llvm::SmallString<64> TempPath; +int FD; --

[PATCH] D55417: [clangd] Change diskbackedstorage to be atomic

2018-12-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 177146. kadircet added a comment. - Fix returns Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55417/new/ https://reviews.llvm.org/D55417 Files: clangd/index/BackgroundIndexStorage.cpp Index: clangd/index/B

[PATCH] D55417: [clangd] Change diskbackedstorage to be atomic

2018-12-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, jfb, arphaman, jkorous, MaskRay, ioeric. There was a chance that multiple clangd instances could try to write same shard, in which case we would get a malformed file most likely. This p