Compare commits
2 Commits
upgrade-je
...
20230424-f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47c55021cb | ||
|
|
b02b201129 |
@@ -164,16 +164,16 @@ DEFINE_VALIDATED_uint64(storage_gc_cycle_sec, 30, "Storage garbage collector int
|
||||
// NOTE: The `storage_properties_on_edges` flag must be the same here and in
|
||||
// `mg_import_csv`. If you change it, make sure to change it there as well.
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
DEFINE_bool(storage_properties_on_edges, false, "Controls whether edges have properties.");
|
||||
DEFINE_bool(storage_properties_on_edges, true, "Controls whether edges have properties.");
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
DEFINE_bool(storage_recover_on_startup, false, "Controls whether the storage recovers persisted data on startup.");
|
||||
DEFINE_bool(storage_recover_on_startup, true, "Controls whether the storage recovers persisted data on startup.");
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
DEFINE_VALIDATED_uint64(storage_snapshot_interval_sec, 0,
|
||||
DEFINE_VALIDATED_uint64(storage_snapshot_interval_sec, 300,
|
||||
"Storage snapshot creation interval (in seconds). Set "
|
||||
"to 0 to disable periodic snapshot creation.",
|
||||
FLAG_IN_RANGE(0, 7 * 24 * 3600));
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
DEFINE_bool(storage_wal_enabled, false,
|
||||
DEFINE_bool(storage_wal_enabled, true,
|
||||
"Controls whether the storage uses write-ahead-logging. To enable "
|
||||
"WAL periodic snapshots must be enabled.");
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
@@ -190,7 +190,7 @@ DEFINE_VALIDATED_uint64(storage_wal_file_flush_every_n_tx,
|
||||
"WAL file. Set to 1 for fully synchronous operation.",
|
||||
FLAG_IN_RANGE(1, 1000000));
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
DEFINE_bool(storage_snapshot_on_exit, false, "Controls whether the storage creates another snapshot on exit.");
|
||||
DEFINE_bool(storage_snapshot_on_exit, true, "Controls whether the storage creates another snapshot on exit.");
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
DEFINE_bool(telemetry_enabled, false,
|
||||
|
||||
@@ -108,23 +108,25 @@ case $1 in
|
||||
esac
|
||||
done
|
||||
|
||||
# Resolve binary path if it is a link.
|
||||
# Copy Memgraph binary, handles both cases, when binary is a sym link
|
||||
# or a regular file.
|
||||
binary_path="$MEMGRAPH_BINARY_PATH"
|
||||
if [ -L "$binary_path" ]; then
|
||||
binary_path=$(readlink "$binary_path")
|
||||
fi
|
||||
binary_name=$(basename -- "$binary_path")
|
||||
|
||||
# Copy Memgraph binary.
|
||||
for iter in $(seq 1 "$JEPSEN_ACTIVE_NODES_NO"); do
|
||||
jepsen_node_name="jepsen-n$iter"
|
||||
# Cleanup the node folder with previous binaries.
|
||||
docker exec "$jepsen_node_name" rm -rf /opt/memgraph/
|
||||
docker exec "$jepsen_node_name" mkdir -p /opt/memgraph
|
||||
docker cp "$binary_path" "$jepsen_node_name":/opt/memgraph/"$binary_name"
|
||||
# TODO(gitbuda): This doesn't work if the pure binary is linked called memgraph
|
||||
docker exec "$jepsen_node_name" bash -c "rm -f /opt/memgraph/memgraph && ln -s /opt/memgraph/$binary_name /opt/memgraph/memgraph"
|
||||
docker exec "$jepsen_node_name" bash -c "touch /opt/memgraph/memgraph.log"
|
||||
docker_exec="docker exec $jepsen_node_name bash -c"
|
||||
if [ "$binary_name" == "memgraph" ]; then
|
||||
_binary_name="memgraph_tmp"
|
||||
else
|
||||
_binary_name="$binary_name"
|
||||
fi
|
||||
$docker_exec "rm -rf /opt/memgraph/ && mkdir -p /opt/memgraph"
|
||||
docker cp "$binary_path" "$jepsen_node_name":/opt/memgraph/"$_binary_name"
|
||||
$docker_exec "ln -s /opt/memgraph/$_binary_name /opt/memgraph/memgraph"
|
||||
$docker_exec "touch /opt/memgraph/memgraph.log"
|
||||
INFO "Copying $binary_name to $jepsen_node_name DONE."
|
||||
done
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
FROM debian:10
|
||||
|
||||
ARG TOOLCHAIN_VERSION=toolchain-v4
|
||||
|
||||
# Stops tzdata interactive configuration.
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt update && apt install -y \
|
||||
ca-certificates wget git
|
||||
# Do NOT be smart here and clean the cache because the container is used in the
|
||||
# stateful context.
|
||||
|
||||
RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/${TOOLCHAIN_VERSION}/${TOOLCHAIN_VERSION}-binaries-debian-10-amd64.tar.gz \
|
||||
-O ${TOOLCHAIN_VERSION}-binaries-debian-10-amd64.tar.gz \
|
||||
&& tar xzvf ${TOOLCHAIN_VERSION}-binaries-debian-10-amd64.tar.gz -C /opt \
|
||||
&& rm ${TOOLCHAIN_VERSION}/${TOOLCHAIN_VERSION}-binaries-debian-10-amd64.tar.gz
|
||||
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
&& ./memgraph/environments/os/debian-10.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./memgraph/environment/os/debian-10.sh install MEMGRAPH_BUILD_DEPS
|
||||
|
||||
RUN cd memgraph \
|
||||
&& source /opt/toolchain-v4/activate \
|
||||
&& ./init \
|
||||
&& cd build \
|
||||
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& make -j4 \
|
||||
&& make -j4 mgconsole
|
||||
|
||||
ENTRYPOINT ["sleep", "infinity"]
|
||||
Reference in New Issue
Block a user