FailedChanges

Summary

  1. Add then resync then Delete cause Pop() panic (commit: 5a27a3f) (details)
  2. Don't allow deleted routes in resync list (commit: 8dee4ea) (details)
Commit 5a27a3f857aef7f542fdeba5f7fcd1008f261738 by pcameron
Add then resync then Delete cause Pop() panic
The eventqueue did not properly handle the following sequence of
operations:
handleEvent ADD default/hello Pop         ADD default/hello Resync
handleEvent DELETE default/hello Pop         DELETE default/hello Pop  
     MODIFIED default/hello  <<< this Pop should not happen
The last Pop references the default/hello route which has been deleted.
This results in a panic in Pop()
The root cause of the problem is the resync adds the route to the queue
with the default ADD state instead of MODIFY.
The previous fix for this in Pop() (46a93289) was moved to Resync().
Fixes 1447928 https://bugzilla.redhat.com/show_bug.cgi?id=1447928
(commit: 5a27a3f)
The file was modifiedpkg/client/cache/eventqueue.go (diff)
The file was modifiedpkg/client/cache/eventqueue_test.go (diff)
Commit 8dee4ea2fcc03c434bb6d659234482bfb77b654e by pcameron
Don't allow deleted routes in resync list
When handleEvent() is called to ADD a route, then called again to DELETE
the route before Pop() processes the ADD, there is no need for the route
to remain in store. handleEvent() can remove it from store. Deleted
routes that are found in store during a Resync() are deleted by Pop() as
they are encouneted.
This limits the number of deleted routes in store and reduces the number
of routes that Resync() adds to the queue.
(commit: 8dee4ea)
The file was modifiedpkg/client/cache/eventqueue.go (diff)
The file was modifiedpkg/client/cache/eventqueue_test.go (diff)