Fix Jepsen replication pause (#1082)
This commit is contained in:
parent
903a9f4636
commit
be4eb95a98
@ -335,7 +335,7 @@ uint64_t InMemoryStorage::ReplicationServer::ReadAndApplyDelta(durability::BaseD
|
||||
}
|
||||
// TODO: Rethink this if we would reuse ReplicationServer for on disk storage.
|
||||
if (auto *inmemoryAcc =
|
||||
dynamic_cast<storage::InMemoryStorage::InMemoryAccessor *>(commit_timestamp_and_accessor->second.get())) {
|
||||
static_cast<storage::InMemoryStorage::InMemoryAccessor *>(commit_timestamp_and_accessor->second.get())) {
|
||||
return inmemoryAcc;
|
||||
}
|
||||
throw utils::BasicException("Received transaction for not supported storage!");
|
||||
|
@ -156,6 +156,7 @@ PROCESS_RESULTS() {
|
||||
start_time="$1"
|
||||
end_time="$2"
|
||||
INFO "Process results..."
|
||||
echo "Start time: ${start_time}, End time: ${end_time}"
|
||||
# Print and pack all test workload runs between start and end time.
|
||||
all_workloads=$(docker exec jepsen-control bash -c 'ls /jepsen/memgraph/store/' | grep test-)
|
||||
all_workload_run_folders=""
|
||||
|
@ -26,17 +26,28 @@
|
||||
[f]
|
||||
{:type :info :f f})
|
||||
|
||||
|
||||
(defn nemesis-events
|
||||
"Constructs events for nemesis based on provided options."
|
||||
[opts]
|
||||
(apply concat
|
||||
[(when (:kill-node? opts)
|
||||
[(cycle (map op [:kill-node :restart-node]))])
|
||||
(when (:partition-halves? opts)
|
||||
[(cycle (map op [:start-partition-halves :stop-partition-halves]))])]
|
||||
))
|
||||
|
||||
|
||||
(defn full-generator
|
||||
"Construct nemesis generator."
|
||||
[opts]
|
||||
(->> [(when (:kill-node? opts)
|
||||
[(cycle (map op [:kill-node :restart-node]))])
|
||||
(when (:partition-halves? opts)
|
||||
[(cycle (map op [:start-partition-halves :stop-partition-halves]))])]
|
||||
(apply concat)
|
||||
gen/mix
|
||||
(gen/stagger (:interval opts))
|
||||
(gen/phases (gen/sleep 60))))
|
||||
(gen/phases
|
||||
(gen/log "Waiting replicas to get data from main.")
|
||||
(gen/sleep 40)
|
||||
(->>
|
||||
(gen/mix (nemesis-events opts))
|
||||
(gen/stagger (:interval opts)))))
|
||||
|
||||
|
||||
(defn nemesis
|
||||
"Composite nemesis and generator"
|
||||
|
Loading…
Reference in New Issue
Block a user