Merge pull request #9181 from influxdata/amh-import-compaction

Schedule a full compaction after a successful import
pull/9182/head
Andrew Hare 2017-11-29 15:30:07 -07:00 committed by GitHub
commit 4531165ce2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,7 @@
- [#9084](https://github.com/influxdata/influxdb/pull/9084): Handle high cardinality deletes in TSM engine
- [#9162](https://github.com/influxdata/influxdb/pull/9162): Improve inmem index startup performance for high cardinality.
- [#8491](https://github.com/influxdata/influxdb/pull/8491): Add further tsi support for streaming/copying shards.
- [#9181](https://github.com/influxdata/influxdb/pull/9181): Schedule a full compaction after a successful import
### Bugfixes

View File

@ -815,8 +815,12 @@ func (e *Engine) Restore(r io.Reader, basePath string) error {
// Import reads a tar archive generated by Backup() and adds each
// file matching basePath as a new TSM file. This obtains
// a write lock so no operations can be performed while Importing.
// If the import is successful, a full compaction is scheduled.
func (e *Engine) Import(r io.Reader, basePath string) error {
return e.overlay(r, basePath, true)
if err := e.overlay(r, basePath, true); err != nil {
return err
}
return e.ScheduleFullCompaction()
}
// overlay reads a tar archive generated by Backup() and adds each file