BUG-4689: Advertising performance fix II 39/33239/2
authorMilos Fabian <milfabia@cisco.com>
Wed, 20 Jan 2016 12:01:23 +0000 (13:01 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 22 Jan 2016 09:50:03 +0000 (09:50 +0000)
commitf85e02bf000e3052b3fb76e9ed73f01601474190
tree11f71e1bbf84a30d376cc7ffb6e986df0102196c
parentfd8f1999aee9765c9b5410ac4bcb2f193006f2cf
BUG-4689: Advertising performance fix II

When AdjRibOutListener get a notification with too many changes,
it can fill output buffer with wrtitten Update messages,
without a chance to flush a socket, because the AdjRibOutListener
is blocked when channel is not writable - deadlock situation until a
savior (KA message) will not be send.
Flushing with every write operation is uneffective, hence try to call
the "flush" in a situation when the channel become unwritable.

Change-Id: Ie50b9154d1166d55308c3438c12b9c1b9d3ce19f
Signed-off-by: Milos Fabian <milfabia@cisco.com>
(cherry picked from commit 095c87da7d565dac2cffa11710e7dd0e4a67c20f)
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/ChannelOutputLimiter.java