ovsdb-monitor: allow multiple jsonrpc monitors to share a single ovsdb
authorAndy Zhou <azhou@nicira.com>
Mon, 16 Mar 2015 10:03:20 +0000 (03:03 -0700)
committerAndy Zhou <azhou@nicira.com>
Mon, 8 Jun 2015 21:28:23 +0000 (14:28 -0700)
commit6e5a9216f3a16c2de508dbaf960c643219d45fa6
treeab0acb1aae650a519da9af5027a750aff4f7a097
parent36247a75e9990a7f7ee3c5124852395f33ba1d38
ovsdb-monitor: allow multiple jsonrpc monitors to share a single ovsdb
monitor

Store ovsdb monitor in a global hmap. If a newly created ovsdb monitor
object monitors the same tables and columns as an existing one, the
existing monitor will be reused.

With this patch, jsonrpc monitor and ovsdb monitor now have N:1 mapping.
The goals are to:
1) Reduce the cost of maintaining duplicated monitors.
2) Allow for create Json cache for the same updates. Json cache will be
introduced in the following patch.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ovsdb/jsonrpc-server.c
ovsdb/monitor.c
ovsdb/monitor.h