Files
scylladb/gms/application_state.hh
Konstantin Osipov 051dceeaff raft: (and gossip) begin gossiping raft server ids
We plan to use gossip data to educate Raft RPC about IP addresses
of raft peers. Add raft server ids to application state, so
that when we get a notification about a gossip peer we can
identify which raft server id this notification is for,
specifically, we can find what IP address stands for this server
id, and, whenever the IP address changes, we can update Raft
address map with the new address.

On the same token, at boot time, we now have to start Gossip
before Raft, since Raft won't be able to send any messages
without gossip data about IP addresses.
2022-11-17 12:07:31 +03:00

51 lines
1003 B
C++

/*
*
* Modified by ScyllaDB
* Copyright (C) 2015-present ScyllaDB
*/
/*
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
*/
#pragma once
#include <ostream>
namespace gms {
enum class application_state {
STATUS = 0,
LOAD,
SCHEMA,
DC,
RACK,
RELEASE_VERSION,
REMOVAL_COORDINATOR,
INTERNAL_IP,
RPC_ADDRESS,
X_11_PADDING, // padding specifically for 1.1
SEVERITY,
NET_VERSION,
HOST_ID,
TOKENS,
SUPPORTED_FEATURES,
CACHE_HITRATES,
SCHEMA_TABLES_VERSION,
RPC_READY,
VIEW_BACKLOG,
SHARD_COUNT,
IGNORE_MSB_BITS,
CDC_GENERATION_ID,
SNITCH_NAME,
// RAFT ID is a server identifier which is maintained
// and gossiped in addition to HOST_ID because it's truly
// unique: any new node gets a new RAFT ID, while may keep
// its existing HOST ID, e.g. if it's replacing an existing node.
RAFT_SERVER_ID,
};
std::ostream& operator<<(std::ostream& os, const application_state& m);
}