[ovs-git] Open vSwitch: jsonrpc-server: Combine notifications when connection becomes backlogged. (master)

dev at openvswitch.org dev at openvswitch.org
Thu Apr 3 15:02:08 UTC 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  48f6e410db6b2cb036b5fdcde89017101c83590c (commit)
       via  03ad470a15ce348d56b8bba5cd8e9aa1b447d633 (commit)
       via  a11fdef12e5dfd9e7ef92e17d521db05905e640e (commit)
       via  7bd02255d93033d8055cb2b78f0d29ac795ff3f5 (commit)
       via  633f724799cd405ffaf48c3d55aab843483ff6f1 (commit)
       via  1fc17407b4bafbb50d0eb46f7ede87dad240b668 (commit)
       via  5cd9f691199d2c75dd477f25869bcd3515ea71e7 (commit)
      from  1af09488c1d11b7980760a32d280506dc23ac32f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 48f6e410db6b2cb036b5fdcde89017101c83590c
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=48f6e410db6b2cb036b5fdcde89017101c83590c
Author: Ben Pfaff <blp at nicira.com>
		
jsonrpc-server: Combine notifications when connection becomes backlogged.
		
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.  This commit implements this new way.

Bug #1211786.
Bug #1221378.
Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Andy Zhou <azhou at nicira.com>


commit 03ad470a15ce348d56b8bba5cd8e9aa1b447d633
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=03ad470a15ce348d56b8bba5cd8e9aa1b447d633
Author: Ben Pfaff <blp at nicira.com>
		
jsonrpc-server: Track monitor updates separately from sending them.
		
This will make combining monitor updates easier in the next commit.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Andy Zhou <azhou at nicira.com>


commit a11fdef12e5dfd9e7ef92e17d521db05905e640e
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=a11fdef12e5dfd9e7ef92e17d521db05905e640e
Author: Ben Pfaff <blp at nicira.com>
		
Revert "json: New function json_serialized_length()."
		
This reverts commit 1600fa6853872e16130366351a2c14f6fa8b547c.

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 at nicira.com>
Acked-by: Andy Zhou <azhou at nicira.com>


commit 7bd02255d93033d8055cb2b78f0d29ac795ff3f5
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7bd02255d93033d8055cb2b78f0d29ac795ff3f5
Author: Ben Pfaff <blp at nicira.com>
		
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 at nicira.com>
Acked-by: Andy Zhou <azhou at nicira.com>


commit 633f724799cd405ffaf48c3d55aab843483ff6f1
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=633f724799cd405ffaf48c3d55aab843483ff6f1
Author: Ben Pfaff <blp at nicira.com>
		
Revert "jsonrpc-server: Disconnect connections that queue too much data."
		
This reverts commit 60533a405b2eb77214b767767fe143c8645f82d5.

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 at nicira.com>
Acked-by: Andy Zhou <azhou at nicira.com>


commit 1fc17407b4bafbb50d0eb46f7ede87dad240b668
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=1fc17407b4bafbb50d0eb46f7ede87dad240b668
Author: Ben Pfaff <blp at nicira.com>
		
Revert "jsonrpc-server: Add test for disconnecting connections with too long queues."
		
This reverts commit 631583739f9aec55d4cbe25fb856143ccde48ab6.

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 at nicira.com>
Acked-by: Andy Zhou <azhou at nicira.com>


commit 5cd9f691199d2c75dd477f25869bcd3515ea71e7
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=5cd9f691199d2c75dd477f25869bcd3515ea71e7
Author: Ben Pfaff <blp at nicira.com>
		
ovsdb-server: Send update for _version for changes due to weak ref removal.
		
When a row was deleted, and that caused the transaction manager to remove
a remaining weak reference to the row, and no other change had been made
to the row in that transaction, and a client was monitoring modifications
of the _version column in the row, then the monitor update for the column
did not include the old contents of the _version column, even though it
should have.  This commit fixes the problem.

Probably most clients only look at the new value of the column, if they
monitor _version at all, and this bug is really old, so it's probably
not a serious bug.

Found by inspection.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Andy Zhou <azhou at nicira.com>


-----------------------------------------------------------------------

Summary of changes:
 lib/json.c             |  115 +----------
 lib/json.h             |    4 +-
 lib/ovsdb-data.c       |   93 +--------
 lib/ovsdb-data.h       |    6 +-
 ovsdb/jsonrpc-server.c |  497 ++++++++++++++++++++++++++++++------------------
 ovsdb/transaction.c    |    1 +
 tests/ovsdb-monitor.at |    2 +-
 tests/ovsdb-server.at  |   99 ++++++----
 tests/test-json.c      |    3 +-
 tests/test-ovsdb.c     |   14 +-
 10 files changed, 388 insertions(+), 446 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list