diff options
author | Medha Potluri <medha.potluri@mongodb.com> | 2019-06-14 11:13:14 -0400 |
---|---|---|
committer | Medha Potluri <medha.potluri@mongodb.com> | 2019-07-03 15:30:12 -0400 |
commit | 8071e24f0f7a4fa83015daa59d828c11c246423c (patch) | |
tree | b8b680b2dd7e7bff065c67e4da9ab15f48074ac0 /src/mongo/db/repl/election_reason_counter.idl | |
parent | 558bc6285f0410c9d48fb491173212408bc6b48d (diff) | |
download | mongo-8071e24f0f7a4fa83015daa59d828c11c246423c.tar.gz |
SERVER-41499 Track number of elections called for each reason in serverStatus
Diffstat (limited to 'src/mongo/db/repl/election_reason_counter.idl')
-rw-r--r-- | src/mongo/db/repl/election_reason_counter.idl | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/mongo/db/repl/election_reason_counter.idl b/src/mongo/db/repl/election_reason_counter.idl new file mode 100644 index 00000000000..3cc0059eb13 --- /dev/null +++ b/src/mongo/db/repl/election_reason_counter.idl @@ -0,0 +1,51 @@ +# Copyright (C) 2019-present MongoDB, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the Server Side Public License, version 1, +# as published by MongoDB, Inc. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# Server Side Public License for more details. +# +# You should have received a copy of the Server Side Public License +# along with this program. If not, see +# <http://www.mongodb.com/licensing/server-side-public-license>. +# +# As a special exception, the copyright holders give permission to link the +# code of portions of this program with the OpenSSL library under certain +# conditions as described in each individual source file and distribute +# linked combinations including the program with the OpenSSL library. You +# must comply with the Server Side Public License in all respects for +# all of the code used other than as permitted herein. If you modify file(s) +# with this exception, you may extend this exception to your version of the +# file(s), but you are not obligated to do so. If you do not wish to do so, +# delete this exception statement from your version. If you delete this +# exception statement from all source files in the program, then also delete +# it in the license file. + +# This IDL file describes the BSON format for ElectionReasonCounterBase and +# handles the serialization to and deserialization from its BSON +# representations for that class. + +global: + cpp_namespace: "mongo::repl" + +imports: + - "mongo/idl/basic_types.idl" + +structs: + ElectionReasonCounterBase: + description: "Stores the total number of elections a node has called for a given reason and + the number of those elections that were successful" + strict: true + fields: + called: + description: "Number of elections this node has called for the given reason" + type: long + default: 0 + successful: + description: "Number of successful elections for the given reason" + type: long + default: 0 |