revalidator: Fix ukey stats cache updating.
revalidate_ukey() had a bug where it would update the ukey->stats even
if it decided not to push stats (as an optimisation). ukey->stats should
only be updated when those stats are pushed.
This bug would arise in the following situation:
* A flow has been dumped before.
* The flow needs to be revalidated.
* The flow is low-throughput.
* The flow has new statistics to push.
Such cases rely on flow deletion to update the stats. However, that code
pushes the delta between the ukey->stats and the final flow dump. If the
ukey stats cache is updated without the stats being pushed, those stats
would be lost.
This caused intermittent testsuite failures on "learning action -
self-modifying flow with idle_timeout". Introduced by
698ffe3623f1b630ae
"revalidator: Only revalidate high-throughput flows."
Bug #1238927.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>