diff options
author | Benjamin Peterson <bp@benjamin.pe> | 2017-04-07 09:40:11 +0000 |
---|---|---|
committer | Marcel Hlopko <hlopko@google.com> | 2017-04-07 16:44:26 +0200 |
commit | 184faf617c4c90adfc33b7217aac53aab98354b2 (patch) | |
tree | f15dfd52ff3b398d8e3c547c179a7b1789ae49b6 /CONTRIBUTING.md | |
parent | 300d7573c3162f814e75131f8fd9782de3cb6297 (diff) |
Do not trample the PersistentMap journal
This fixes https://github.com/bazelbuild/bazel/issues/2660. Basically,
if we elect to keep the journal during PersistentMap.save(), we
shouldn't stomp over it the next time save() is called.
In writeJournal(), we now check if the journal file exists, and open
it in append mode if it does. Alternatively, we could simply not close
(and thus forget about) the journal in save(), but that would leak the
journal file handle if save() was never called with keepJournal()
returning false.
Change-Id: Id00732f161c8b5a082a6c109aee115591ace2ea7
PiperOrigin-RevId: 152480978
Diffstat (limited to 'CONTRIBUTING.md')
0 files changed, 0 insertions, 0 deletions