Commit Graph

2 Commits

Author SHA1 Message Date
Orion Reblitz-Richardson
d1bdb3b10a Remove core and util warnings (#8239)
* Fix some signed/unsigned mismatches

* Skip unused result warning

* Explict fallthrough for murmur hash

* Enable aligned new support to eliminate warning

* Switch to int instead of unsigned in some cases
2018-06-07 09:10:33 -07:00
Pieter Noordhuis
e63003d5a0 Fix race in FileStoreHandler
Summary:
It was possible for a set and a get to race such that the get
would return an empty string, if the file for the key was created but
not yet written to. This change updates the FileStoreHandler to first
write to a temporary file and then atomically rename(2) the file to
its final path. This removes the described race condition.

This change also replaces the poor filename generation routine with
using the 128-bit MurmurHash of a key.

Differential Revision: D4502154

fbshipit-source-id: f2abc78b8bad68c06ad2f18a078935826e431f7a
2017-02-03 09:59:45 -08:00