BUG-985 - finisher queue is unbound 85/6885/4
authorJan Medved <jmedved@cisco.com>
Mon, 12 May 2014 05:39:50 +0000 (22:39 -0700)
committerMichal Rehak <mirehak@cisco.com>
Mon, 12 May 2014 17:28:49 +0000 (19:28 +0200)
commit2a893dae70973aef528849271e35fb28bda13d19
tree53d96aab9fc4930d6a37b0e8fcaaf94f8ab6e547
parent92cded5d8e07ab26bcff9a38fa54251305771e3f
BUG-985 - finisher queue is unbound

and causes out of memory error under stress

- replaced queue.offer with queue.put (blocking behavior)

Changed the initialization of the TicketFinisher queue to limit the size of the queue to 1,000 elements. Backpressure will be exerted when the max queue size has been reached. This is to fix an out-of-memory condition that occurs under heavy load when the TicketFinisher queue grows w/o bounds.

Change-Id: I619d1c27db98fec95380bef2504add3025195abc
Signed-off-by: Jan Medved <jmedved@cisco.com>
Signed-off-by: Michal Rehak <mirehak@cisco.com>
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/queue/QueueKeeperLightImpl.java