Force create TSS files.

This commit replaces an `os.OpenFile()` call with an `os.Create()`
call which drops `O_EXCL` for `O_TRUNC` since `.tss` files are only
created after `.tsm` files so lingering temporary files are safe to
overwrite.
pull/10616/head
Ben Johnson 2018-11-23 13:11:11 -07:00
parent a06d4dea16
commit e22aff46cb
No known key found for this signature in database
GPG Key ID: 81741CD251883081
1 changed files with 1 additions and 1 deletions

View File

@ -789,7 +789,7 @@ func (t *tsmWriter) writeStatsFile() error {
return nil
}
f, err := os.OpenFile(StatsFilename(fw.Name()), os.O_CREATE|os.O_RDWR|os.O_EXCL, 0666)
f, err := os.Create(StatsFilename(fw.Name()))
if err != nil {
return err
}