Skip to content

Commit

Permalink
Merge pull request #9496 from influxdata/bj-fix-series-key-replay-aft…
Browse files Browse the repository at this point in the history
…er-delete

Fix panic on tsi1 log replay of deleted series.
  • Loading branch information
benbjohnson authored Feb 28, 2018
2 parents 3fa3af4 + 567a35d commit fb3187f
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 fb3187f

Please sign in to comment.