Skip to content

Commit

Permalink
receive: close DBReadOnly after flushing
Browse files Browse the repository at this point in the history
Signed-off-by: Brett Jones <blockloop@users.noreply.github.com>
  • Loading branch information
blockloop committed Dec 9, 2019
1 parent 7426f1f commit f30b36c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ NOTE: As semantic versioning states all 0.y.z releases can contain breaking chan
We use *breaking* word for marking changes that are not backward compatible (relates only to v0.y.z releases.)

## Unreleased
### Fixed

- [#1856](https://github.com/thanos-io/thanos/pull/1856) Receive: close DBReadOnly after flushing to fix a memory leak.

### Added
- [#1852](https://github.com/thanos-io/thanos/pull/1852) Add support for `AWS_CONTAINER_CREDENTIALS_FULL_URI` by upgrading to minio-go v6.0.44

Expand Down
1 change: 1 addition & 0 deletions pkg/receive/tsdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func (f *FlushableStorage) Flush() error {
if err != nil {
return errors.Wrap(err, "opening read-only DB")
}
defer ro.Close()
if err := ro.FlushWAL(f.path); err != nil {
return errors.Wrap(err, "flushing WAL")
}
Expand Down

0 comments on commit f30b36c

Please sign in to comment.