Anton Kaliaev
5b1b1ea58a
[libs/autofile] fix DATA RACE by removing openFile() call (#2539)
There's a time window after we call RotateFile() where autofile#index+1 does not exist. It will be created during the next call to Write(). BUT if somebody calls NewReader() before Write(), it will fail with "open /tmp/wal#index+1/wal: no such file or directory" We must create file (either by calling gr.Head.openFile() or directly) during NewReader() to ensure read calls succeed. Closes #2538 |
6 years ago | |
---|---|---|
.. | ||
cmd | libs: Call Flush() before rename #2428 (#2439) | 6 years ago |
README.md | mv tmlibs files to libs dir | 6 years ago |
autofile.go | libs: Handle SIGHUP explicitly inside autofile (#2480) | 6 years ago |
autofile_test.go | libs: Handle SIGHUP explicitly inside autofile (#2480) | 6 years ago |
group.go | [libs/autofile] fix DATA RACE by removing openFile() call (#2539) | 6 years ago |
group_test.go | libs: Call Flush() before rename #2428 (#2439) | 6 years ago |