Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
restore: do not do compact after engine file imported
Browse files Browse the repository at this point in the history
  • Loading branch information
lonng committed Jan 16, 2019
1 parent 389dc6b commit b2847a0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lightning/restore/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ func (t *TableRestore) importEngine(
closedEngineWorker *worker.RestoreWorker,
) error {
if cp.Status >= CheckpointStatusImported {
rc.closedEngineLimit.Recycle(closedEngineWorker)
return nil
}

Expand All @@ -664,15 +665,7 @@ func (t *TableRestore) importEngine(
rc.postProcessLock.Lock()
err := t.importKV(ctx, closedEngine)
rc.closedEngineLimit.Recycle(closedEngineWorker)

// gofail: var SlowDownImport struct{}

// 2. perform a level-1 compact if idling.
if err := rc.doCompact(ctx, Level1Compact); err != nil {
// log it and continue
common.AppLogger.Warnf("compact %d failed %v", Level1Compact, err)
}

rc.postProcessLock.Unlock()
rc.saveStatusCheckpoint(t.tableName, engineID, err, CheckpointStatusImported)
if err != nil {
Expand Down

0 comments on commit b2847a0

Please sign in to comment.