The GMS and derecho_group will share the same SST for efficiency. More...
#include <derecho_sst.hpp>
Public Member Functions | |
DerechoSST (const sst::SSTParams ¶meters, uint32_t num_subgroups, uint32_t num_received_size, uint64_t slot_size) | |
Constructs an SST, and initializes the GMS fields to "safe" initial values (0, false, etc.). More... | |
void | init_local_row_from_previous (const DerechoSST &old_sst, const int row, const int num_changes_installed) |
Initializes the local row of this SST based on the specified row of the previous View's SST. More... | |
void | init_local_change_proposals (const int other_row) |
Copies currently proposed changes and the various counter values associated with them to the local row from some other row (i.e. More... | |
std::string | to_string () const |
Creates a string representation of the local row (not the whole table). More... | |
Public Member Functions inherited from sst::SST< DerechoSST > | |
SST (DerechoSST *derived_class_pointer, const SSTParams ¶ms) | |
void | SSTInit (Fields &... fields) |
~SST () | |
Destructor for the SST object; sets thread_shutdown to true and waits for background threads to exit cleanly. More... | |
void | start_predicate_evaluation () |
Starts the predicate evaluation loop. More... | |
void | sync_with_members () const |
Does a TCP sync with each member of the SST. More... | |
void | sync_with_members (std::vector< uint32_t > row_indices) const |
Syncs with a subset of the members. More... | |
void | freeze (int row_index) |
Marks a row as frozen, so it will no longer update, and its corresponding node will not receive writes. More... | |
unsigned int | get_num_rows () const |
Returns the total number of rows in the table. More... | |
unsigned int | get_local_index () const |
Gets the index of the local row in the table. More... | |
const char * | getBaseAddress () |
void | put () |
Writes the entire local row to all remote nodes. More... | |
void | put (const std::vector< uint32_t > receiver_ranks) |
Writes the entire local row to some of the remote nodes. More... | |
void | put (size_t offset, size_t size) |
Writes a contiguous subset of the local row to all remote nodes. More... | |
void | put (SSTField< T > &field) |
Writes a specific local field to all remote nodes. More... | |
void | put (SSTFieldVector< T > &vec_field) |
Writes a specific local vector field to all remote nodes. More... | |
void | put (SSTFieldVector< T > &vec_field, std::size_t index) |
Writes only a single element of a vector field to all remote nodes. More... | |
void | put (const std::vector< uint32_t > receiver_ranks, SSTFieldVector< T > &vec_field, std::size_t index) |
Writes only a single element of a vector field to only some of the remote nodes. More... | |
void | put (const std::vector< uint32_t > receiver_ranks, size_t offset, size_t size) |
Writes a contiguous subset of the local row to some of the remote nodes. More... | |
void | put_with_completion () |
void | put_with_completion (const std::vector< uint32_t > receiver_ranks) |
void | put_with_completion (size_t offset, size_t size) |
void | put_with_completion (const std::vector< uint32_t > receiver_ranks, size_t offset, size_t size) |
Public Attributes | |
SSTFieldVector< message_id_t > | seq_num |
Sequence numbers are interpreted like a row-major pair: (sender, index) becomes sender + num_members * index. More... | |
SSTFieldVector< message_id_t > | delivered_num |
This represents the highest sequence number that has been delivered at this node. More... | |
SSTFieldVector< persistent::version_t > | persisted_num |
This represents the highest persistent version number that has been persisted to disk at this node, if persistence is enabled. More... | |
SSTField< int32_t > | vid |
View ID associated with this SST. More... | |
SSTFieldVector< bool > | suspected |
Array of same length as View::members, where each bool represents whether the corresponding member is suspected to have failed. More... | |
SSTFieldVector< node_id_t > | changes |
An array of the same length as View::members, containing a list of proposed changes to the view that have not yet been installed. More... | |
SSTFieldVector< uint32_t > | joiner_ips |
If changes[i] is a Join, joiner_ips[i] is the IP address of the joining node, packed into an unsigned int in network byte order. More... | |
SSTFieldVector< uint16_t > | joiner_gms_ports |
joiner_xxx_ports are the port numbers for the joining nodes. More... | |
SSTFieldVector< uint16_t > | joiner_rpc_ports |
SSTFieldVector< uint16_t > | joiner_sst_ports |
SSTFieldVector< uint16_t > | joiner_rdmc_ports |
SSTField< int > | num_changes |
How many changes to the view have been proposed. More... | |
SSTField< int > | num_committed |
How many proposed view changes have reached the commit point. More... | |
SSTField< int > | num_acked |
How many proposed changes have been seen. More... | |
SSTField< int > | num_installed |
How many previously proposed view changes have been installed in the current view. More... | |
SSTFieldVector< int32_t > | num_received |
Local count of number of received messages by sender. More... | |
SSTField< bool > | wedged |
Set after calling rdmc::wedged(), reports that this member is wedged. More... | |
SSTFieldVector< int > | global_min |
Array of how many messages to accept from each sender in the current view change. More... | |
SSTFieldVector< bool > | global_min_ready |
Array indicating whether each shard leader (indexed by subgroup number) has published a global_min for the current view change. More... | |
SSTFieldVector< char > | slots |
for SST multicast More... | |
SSTFieldVector< int32_t > | num_received_sst |
SSTFieldVector< uint64_t > | local_stability_frontier |
to check for failures - used by the thread running check_failures_loop in derecho_group More... | |
SSTField< bool > | rip |
to signal a graceful exit More... | |
Public Attributes inherited from sst::SST< DerechoSST > | |
Predicates< DerechoSST > | predicates |
The GMS and derecho_group will share the same SST for efficiency.
This class defines all the fields in this SST.
Definition at line 22 of file derecho_sst.hpp.
|
inline |
Constructs an SST, and initializes the GMS fields to "safe" initial values (0, false, etc.).
Initializing the MulticastGroup fields is left to MulticastGroup.
parameters | The SST parameters, which will be forwarded to the standard SST constructor. |
Definition at line 134 of file derecho_sst.hpp.
void derecho::DerechoSST::init_local_change_proposals | ( | const int | other_row | ) |
Copies currently proposed changes and the various counter values associated with them to the local row from some other row (i.e.
the group leader's row).
other_row | The row to copy values from. |
Definition at line 47 of file derecho_sst.cpp.
void derecho::DerechoSST::init_local_row_from_previous | ( | const DerechoSST & | old_sst, |
const int | row, | ||
const int | num_changes_installed | ||
) |
Initializes the local row of this SST based on the specified row of the previous View's SST.
Copies num_changes, num_committed, and num_acked, adds num_changes_installed to the previous value of num_installed, copies (num_changes - num_changes_installed) elements of changes, and initializes the other SST fields to 0/false.
old_sst | The SST instance to copy data from |
row | The target row in that SST instance (from which data will be copied) |
num_changes_installed | The number of changes that were applied when changing from the previous view to this one |
Definition at line 7 of file derecho_sst.cpp.
std::string derecho::DerechoSST::to_string | ( | ) | const |
Creates a string representation of the local row (not the whole table).
This should be converted to an ostream operator<< to follow standards.
Definition at line 75 of file derecho_sst.cpp.
SSTFieldVector<node_id_t> derecho::DerechoSST::changes |
An array of the same length as View::members, containing a list of proposed changes to the view that have not yet been installed.
The number of valid elements is num_changes - num_installed, which should never exceed View::num_members/2. If request i is a Join, changes[i] is not in current View's members. If request i is a Departure, changes[i] is in current View's members.
Definition at line 67 of file derecho_sst.hpp.
SSTFieldVector<message_id_t> derecho::DerechoSST::delivered_num |
This represents the highest sequence number that has been delivered at this node.
Messages are only delivered once stable (received by all), so it must be at least stable_num.
Definition at line 43 of file derecho_sst.hpp.
SSTFieldVector<int> derecho::DerechoSST::global_min |
Array of how many messages to accept from each sender in the current view change.
Definition at line 113 of file derecho_sst.hpp.
SSTFieldVector<bool> derecho::DerechoSST::global_min_ready |
Array indicating whether each shard leader (indexed by subgroup number) has published a global_min for the current view change.
Definition at line 118 of file derecho_sst.hpp.
SSTFieldVector<uint16_t> derecho::DerechoSST::joiner_gms_ports |
joiner_xxx_ports are the port numbers for the joining nodes.
Definition at line 76 of file derecho_sst.hpp.
SSTFieldVector<uint32_t> derecho::DerechoSST::joiner_ips |
If changes[i] is a Join, joiner_ips[i] is the IP address of the joining node, packed into an unsigned int in network byte order.
This representation is necessary because SST doesn't support variable-length strings.
Definition at line 74 of file derecho_sst.hpp.
SSTFieldVector<uint16_t> derecho::DerechoSST::joiner_rdmc_ports |
Definition at line 79 of file derecho_sst.hpp.
SSTFieldVector<uint16_t> derecho::DerechoSST::joiner_rpc_ports |
Definition at line 77 of file derecho_sst.hpp.
SSTFieldVector<uint16_t> derecho::DerechoSST::joiner_sst_ports |
Definition at line 78 of file derecho_sst.hpp.
SSTFieldVector<uint64_t> derecho::DerechoSST::local_stability_frontier |
to check for failures - used by the thread running check_failures_loop in derecho_group
Definition at line 124 of file derecho_sst.hpp.
SSTField<int> derecho::DerechoSST::num_acked |
How many proposed changes have been seen.
Incremented by a member to acknowledge that it has seen a proposed change.
Definition at line 93 of file derecho_sst.hpp.
SSTField<int> derecho::DerechoSST::num_changes |
How many changes to the view have been proposed.
Monotonically increases. num_changes - num_committed is the number of pending changes, which should never exceed the number of members in the current view. If num_changes == num_committed == num_installed, no changes are pending.
Definition at line 86 of file derecho_sst.hpp.
SSTField<int> derecho::DerechoSST::num_committed |
How many proposed view changes have reached the commit point.
Definition at line 88 of file derecho_sst.hpp.
SSTField<int> derecho::DerechoSST::num_installed |
How many previously proposed view changes have been installed in the current view.
Monotonically increases, lower bound on num_committed.
Definition at line 98 of file derecho_sst.hpp.
SSTFieldVector<int32_t> derecho::DerechoSST::num_received |
Local count of number of received messages by sender.
For each sender k, nReceived[k] is the number received (a.k.a. "locally stable").
Definition at line 103 of file derecho_sst.hpp.
SSTFieldVector<int32_t> derecho::DerechoSST::num_received_sst |
Definition at line 121 of file derecho_sst.hpp.
SSTFieldVector<persistent::version_t> derecho::DerechoSST::persisted_num |
This represents the highest persistent version number that has been persisted to disk at this node, if persistence is enabled.
This is updated by the PersistenceManager.
Definition at line 49 of file derecho_sst.hpp.
SSTField<bool> derecho::DerechoSST::rip |
to signal a graceful exit
Definition at line 127 of file derecho_sst.hpp.
SSTFieldVector<message_id_t> derecho::DerechoSST::seq_num |
Sequence numbers are interpreted like a row-major pair: (sender, index) becomes sender + num_members * index.
Since the global order is round-robin, the correct global order of messages becomes a consecutive sequence of these numbers: with 4 senders, we expect to receive (0,0), (1,0), (2,0), (3,0), (0,1), (1,1), ... which is 0, 1, 2, 3, 4, 5, ....
This variable is the highest sequence number that has been received in-order by this node; if a node updates seq_num, it has received all messages up to seq_num in the global round-robin order.
Definition at line 37 of file derecho_sst.hpp.
SSTFieldVector<char> derecho::DerechoSST::slots |
for SST multicast
Definition at line 120 of file derecho_sst.hpp.
SSTFieldVector<bool> derecho::DerechoSST::suspected |
Array of same length as View::members, where each bool represents whether the corresponding member is suspected to have failed.
Definition at line 58 of file derecho_sst.hpp.
SSTField<int32_t> derecho::DerechoSST::vid |
View ID associated with this SST.
VIDs monotonically increase as views change.
Definition at line 53 of file derecho_sst.hpp.
SSTField<bool> derecho::DerechoSST::wedged |
Set after calling rdmc::wedged(), reports that this member is wedged.
Must be after num_received!
Definition at line 108 of file derecho_sst.hpp.