Skip to content

Commit

Permalink
Fix panic on tsi1 log replay of deleted series.
Browse files Browse the repository at this point in the history
  • Loading branch information
benbjohnson committed Feb 28, 2018
1 parent 6a83bf4 commit 567a35d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tsdb/index/tsi1/log_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,14 @@ func (f *LogFile) execSeriesEntry(e *LogEntry) {
seriesKey = f.sfile.SeriesKey(e.SeriesID)
}

assert(seriesKey != nil, fmt.Sprintf("series key for ID: %d not found", e.SeriesID))
// Series keys can be removed if the series has been deleted from
// the entire database and the server is restarted. This would cause
// the log to replay its insert but the key cannot be found.
//
// https://github.com/influxdata/influxdb/issues/9444
if seriesKey == nil {
return
}

// Check if deleted.
deleted := e.Flag == LogEntrySeriesTombstoneFlag
Expand Down

0 comments on commit 567a35d

Please sign in to comment.