Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failure on Windows Windows does not allow a file to be renamed while its in use. f.Sync does not close the handle. It needs to be explicitly closed before renaming. #6260

Merged
merged 1 commit into from
Apr 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [#6190](https:/influxdata/influxdb/pull/6190): Fix race on measurementFields.
- [#6248](https:/influxdata/influxdb/issues/6248): Panic using incorrectly quoted "queries" field key.
- [#6257](https:/influxdata/influxdb/issues/6257): CreateShardGroup was incrementing meta data index even when it was idempotent.
- [#6223](https:/influxdata/influxdb/issues/6223): Failure to start/run on Windows. Thanks @mvadu

## v0.12.0 [2016-04-05]

Expand Down
5 changes: 5 additions & 0 deletions services/meta/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,11 @@ func snapshot(path string, data *Data) error {
return err
}

//close file handle before renaming to support Windows
if err = f.Close(); err != nil {
return err
}

return renameFile(tmpFile, file)
}

Expand Down