From patchwork Wed Dec 2 06:23:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1409333 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cm87g4X5Qz9sRK for ; Wed, 2 Dec 2020 17:24:15 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id B820286E97; Wed, 2 Dec 2020 06:24:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Yi93Mpt_49EG; Wed, 2 Dec 2020 06:24:11 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 40EE6834E3; Wed, 2 Dec 2020 06:24:07 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 00A2CC1DA0; Wed, 2 Dec 2020 06:24:07 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id A7218C0052 for ; Wed, 2 Dec 2020 06:24:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 8F18F2E1F1 for ; Wed, 2 Dec 2020 06:24:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OHQGRcQOYOm9 for ; Wed, 2 Dec 2020 06:24:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by silver.osuosl.org (Postfix) with ESMTPS id C8A682E20A for ; Wed, 2 Dec 2020 06:24:00 +0000 (UTC) X-Originating-IP: 75.54.222.30 Received: from sigfpe.attlocal.net (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 86F96E0003; Wed, 2 Dec 2020 06:23:58 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Tue, 1 Dec 2020 22:23:39 -0800 Message-Id: <20201202062341.1367060-7-blp@ovn.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201202062341.1367060-1-blp@ovn.org> References: <20201202062341.1367060-1-blp@ovn.org> MIME-Version: 1.0 Cc: Ben Pfaff Subject: [ovs-dev] [PATCH v2 6/8] ovsdb-idl: Add comment. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Ben Pfaff --- lib/ovsdb-idl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 5502fdab8644..e1013da86c56 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -617,6 +617,14 @@ ovsdb_idl_destroy(struct ovsdb_idl *idl) } } +/* By default, or if 'leader_only' is true, when 'idl' connects to a clustered + * database, the IDl will avoid servers other than the cluster leader. This + * ensures that any data that it reads and reports is up-to-date. If + * 'leader_only' is false, the IDL will accept any server in the cluster, which + * means that for read-only transactions it can report and act on stale data + * (transactions that modify the database are always serialized even with false + * 'leader_only'). Refer to Understanding Cluster Consistency in ovsdb(7) for + * more information. */ void ovsdb_idl_set_leader_only(struct ovsdb_idl *idl, bool leader_only) {