[ovs-dev] [ovsdb speedup v3 13/19] ovsdb-monitor: add transaction ids

Andy Zhou azhou at nicira.com
Sat May 30 00:05:11 UTC 2015


On Fri, May 29, 2015 at 11:39 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Thu, Apr 09, 2015 at 06:40:22PM -0700, Andy Zhou wrote:
>> With N:1 mappings, multiple jsonrpc server may be servicing the rpc
>> connection at a different pace. ovsdb-monitor thus needs to maintain
>> different change sets, depends on connection speed of each rpc
>> connections. Connections servicing at the same speed can share the
>> same change set.
>>
>> Transaction ID is an concept added to describe the change set. One
>>  possible view of the database state is a sequence of changes, more
>>  precisely, commits be applied to it in order, starting from an
>>  initial state, with commit 0. The logic can also be applied to the
>>  jsonrpc monitor; each change it pushes corresponds to commits between
>>  two transaction IDs.
>
> Most of the above paragraph is indented one space.
Fixed.
>
>> This patch introduces transaction IDs. For ovsdb-monitor, it maintains
>> n_transactions, starting from 0. Each commit add 1 to the number.
>> Jsonrpc maintains and 'unflushed' transaction number, corresponding to
>> the next commit the remote has not seen. jsonrpc's job is simply to
>> notice there are changes in the ovsdb-monitor that it is interested in,
>> i.e.  'n_transactions' >= 'unflushed', get the changes in json format,
>> and push them to the remote site.
>>
>> Signed-off-by: Andy Zhou <azhou at nicira.com>
>> Acked-by: Ben Pfaff <blp at nicira.com>
>>
>> ---
>> v1->v2: style fixes
>> v2->v3: no change
>
> Acked-by: Ben Pfaff <blp at nicira.com>



More information about the dev mailing list