diff options
| author | Ben Pfaff <blp@nicira.com> | 2014-04-02 07:11:20 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2014-04-03 07:53:54 -0700 |
| commit | a11fdef12e5dfd9e7ef92e17d521db05905e640e (patch) | |
| tree | 48136056b6567d229efb7dda6e8bbe413a23bc64 /lib/json.h | |
| parent | 7bd02255d93033d8055cb2b78f0d29ac795ff3f5 (diff) | |
| download | openvswitch-a11fdef12e5dfd9e7ef92e17d521db05905e640e.tar.gz | |
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@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
Diffstat (limited to 'lib/json.h')
| -rw-r--r-- | lib/json.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/json.h b/lib/json.h index ef2312449..cfe9457ef 100644 --- a/lib/json.h +++ b/lib/json.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, 2013 Nicira, Inc. + * Copyright (c) 2009, 2010 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -127,8 +127,6 @@ enum { }; char *json_to_string(const struct json *, int flags); void json_to_ds(const struct json *, int flags, struct ds *); - -size_t json_serialized_length(const struct json *); /* JSON string formatting operations. */ |
