Revert "ovsdb-data: New functions for predicting serialized length of data."
authorBen Pfaff <blp@nicira.com>
Wed, 2 Apr 2014 14:10:40 +0000 (07:10 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 3 Apr 2014 14:53:48 +0000 (07:53 -0700)
commit7bd02255d93033d8055cb2b78f0d29ac795ff3f5
tree6155cfebc7eaed3bfcb3dbe151793cd4c12f3651
parent633f724799cd405ffaf48c3d55aab843483ff6f1
Revert "ovsdb-data: New functions for predicting serialized length of data."

This reverts commit 0ea7bec76d804a2c4efccd3dbdaa3e30cf536a5c.

Connections that queue up too much data, because they are monitoring a
table that is changing quickly and failing to keep up with the updates,
cause problems with buffer management.  Since commit 60533a405b2e
(jsonrpc-server: Disconnect connections that queue too much data.),
ovsdb-server has dealt with them by disconnecting the connection and
letting them start up again with a fresh copy of the database.  However,
this is not ideal because of situations where disconnection happens
repeatedly.  For example:

     - A manager toggles a column back and forth between two or more values
       quickly (in which case the data transmitted over the monitoring
       connections always increases quickly, without bound).

     - A manager repeatedly extends the contents of some column in some row
       (in which case the data transmitted over the monitoring connection
       grows with O(n**2) in the length of the string).

A better way to deal with this problem is to combine updates when they are
sent to the monitoring connection, if that connection is not keeping up.
In both the above cases, this reduces the data that must be sent to a
manageable amount.  An upcoming patch implements this new way.  This commit
reverts part of the previous solution that disconnects backlogged
connections, since it is no longer useful.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
lib/ovsdb-data.c
lib/ovsdb-data.h
tests/test-ovsdb.c