]> git.proxmox.com Git - mirror_ovs.git/commit - ovsdb/ovsdb-idlc.in
ovsdb-idl: Tolerate initialization races for singleton tables.
authorBen Pfaff <blp@ovn.org>
Tue, 12 Sep 2017 19:57:46 +0000 (12:57 -0700)
committerBen Pfaff <blp@ovn.org>
Mon, 11 Dec 2017 22:40:47 +0000 (14:40 -0800)
commit25540a777ff6c81ff71ace04ffabfd0df93e5e2d
treef1975007c080814377f3c8c850263f7352b6a34f
parent7a3608245c0b68e4e449fe05ac7ebb774911235b
ovsdb-idl: Tolerate initialization races for singleton tables.

By verifying that singleton tables (that is, tables that should have exactly
one row) are empty when they emit transactions that insert into them,
ovs-vsctl and similar tools tolerate initialization races, where more than one
client at a time tries to initialize a singleton table.

The upshot is that if you create a database and then run multiple ovs-vsctl
(etc.) commands against it in parallel (without first initializing it
serially), then without this patch sometimes you will sometimes get failures
but this patch avoids them.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Alin Gabriel Serdean <aserdean@ovn.org>
lib/ovsdb-idl-provider.h
lib/ovsdb-idl.c
ovsdb/ovsdb-idlc.in