* Storage takes care of the saving of setting when a new replica is added * Restore replicas at startup * Modify interactive_mg_runner + memgraph to support that data-directory can be configured in CONTEXT * Extend e2e test * Correct typo * Add flag to config to specify when replication should be stored (true by default when starting Memgraph) * Remove un-necessary "--" in yaml file * Make sure Memgraph stops if a replica can't be restored. * Add UT covering the parsing of ReplicaStatus to/from json * Add assert in e2e script to check that a port is free before using it * Add test covering crash on Jepsen * Make sure applciaiton crashes if it starts on corrupted replications' info Starting with a non-reponsive replica is allowed. * Add temporary startup flag: this is needed so jepsen do not automatically restore replica on startup of main. This will be removed in T0835
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
// Copyright 2022 Memgraph Ltd.
|
|
//
|
|
// Use of this software is governed by the Business Source License
|
|
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
|
// License, and you may not use this file except in compliance with the Business Source License.
|
|
//
|
|
// As of the Change Date specified in that file, in accordance with
|
|
// the Business Source License, use of this software will be governed
|
|
// by the Apache License, Version 2.0, included in the file
|
|
// licenses/APL.txt.
|
|
|
|
#pragma once
|
|
|
|
#include <chrono>
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
namespace memgraph::storage::replication {
|
|
struct ReplicationClientConfig {
|
|
// The default delay between main checking/pinging replicas is 1s because
|
|
// that seems like a reasonable timeframe in which main should notice a
|
|
// replica is down.
|
|
std::chrono::seconds replica_check_frequency{1};
|
|
|
|
struct SSL {
|
|
std::string key_file = "";
|
|
std::string cert_file = "";
|
|
|
|
friend bool operator==(const SSL &, const SSL &) = default;
|
|
};
|
|
|
|
std::optional<SSL> ssl;
|
|
};
|
|
|
|
struct ReplicationServerConfig {
|
|
struct SSL {
|
|
std::string key_file;
|
|
std::string cert_file;
|
|
std::string ca_file;
|
|
bool verify_peer;
|
|
};
|
|
|
|
std::optional<SSL> ssl;
|
|
};
|
|
} // namespace memgraph::storage::replication
|