From a76ba8254ddd35b81190c7380fc66b9765e9b9fd Mon Sep 17 00:00:00 2001 From: Han Zhou Date: Thu, 22 Aug 2019 14:08:22 -0700 Subject: raft: Save and read new election timer in header snapshot. This patch store the latest election timer in snapshot during log compression, and when server restarts it reads the value from the log. Without this, any previous changes to election timer will be lost in the log, and if server restarts, it will use the default value instead of the changed value. Fixes: commit 8e35461 ("ovsdb raft: Support leader election time change online.") Signed-off-by: Han Zhou Signed-off-by: Ben Pfaff --- Documentation/ref/ovsdb.5.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Documentation/ref') diff --git a/Documentation/ref/ovsdb.5.rst b/Documentation/ref/ovsdb.5.rst index a6da65df3..bb35eee6c 100644 --- a/Documentation/ref/ovsdb.5.rst +++ b/Documentation/ref/ovsdb.5.rst @@ -164,7 +164,7 @@ The clustered format has the following additional notation: This allows readers to be ignorant of the full semantics of schema change. The first record in a clustered database contains the following members, -all of which are required: +all of which are required, except ``prev_election_timer``: ``"server_id": `` The server's own UUID, which must be unique within the cluster. @@ -190,6 +190,10 @@ all of which are required: term "prev_term". It might not include this server, if it was not the initial server in the cluster. +``"prev_election_timer": `` + The election base time before the beginning of the log. If not exist, + the default value 1000 ms is used as if it exists this record. + ``"prev_data": `` and ``"prev_eid": `` A snapshot of the data in the database at index "prev_index" and term "prev_term", and the entry ID for that data. The snapshot must contain a -- cgit v1.2.1