Skip to content

Commit

Permalink
cache: add panic if row to be deleted isn't in cache
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Tucker <[email protected]>
  • Loading branch information
dave-tucker committed Oct 12, 2021
1 parent c6d93b9 commit f2b3ce2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,9 @@ func (t *TableCache) Populate2(tableUpdates ovsdb.TableUpdates2) {
// If everything else is nil (including Delete because it's a key with
// no value on the wire), then process a delete
m := tCache.Row(uuid)
if m == nil {
panic(fmt.Errorf("row with uuid %s does not exist", uuid))
}
if err := tCache.Delete(uuid); err != nil {
panic(err)
}
Expand Down

0 comments on commit f2b3ce2

Please sign in to comment.