Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions scripts/run-jepsen-m5-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,18 @@ for bin in "$ROUTE_KEY_BIN" "$LIST_ROUTES_BIN" "$BINARY"; do
done
T1_KEY="$("$ROUTE_KEY_BIN" jepsen_append_t1)"
T3_KEY="$("$ROUTE_KEY_BIN" jepsen_append_t3)"
# Group 1: [T1_KEY, T3_KEY) — tables 1, 2
# Group 2: [T3_KEY, +inf) — tables 3, 4
# Keys outside [T1_KEY, +inf) fall through to the default group; this
# workload only writes table-route keys so that range is unused.
SHARD_RANGES="${T1_KEY}:${T3_KEY}=1,${T3_KEY}:=2"
# Issue #930 fix: --shardRanges must cover every routing key. Without
# a [<empty>, T1_KEY) range, any table whose base64-encoded name sorts
# before "amVwc2VuX2FwcGVuZF90MQ" (= base64("jepsen_append_t1"))
# returns "no route for key" from ShardedCoordinator.dispatchTxn, and
# createTableWithRetry silently swallows that as ACTIVE.
#
# Group 1: [<empty>, T3_KEY) — default + tables 1, 2
# Group 2: [T3_KEY, +inf) — tables 3, 4
#
# Note: assigning the default range to group 1 (not a third group) keeps
# the topology consistent with the 1-process-2-groups launch.
SHARD_RANGES=":${T3_KEY}=1,${T3_KEY}:=2"
echo "[shard-ranges] $SHARD_RANGES"

# ---- stop any previously managed cluster ----
Expand Down Expand Up @@ -206,10 +213,19 @@ HOME="$(pwd)/tmp-home" LEIN_HOME="$(pwd)/.lein" \
--local \
--time-limit 30 \
--rate 5 \
--host 127.0.0.1 \
--dynamo-port 63801 \
--list-routes-bin "$LIST_ROUTES_BIN" \
--grpc-host-port "$PROC_ADDR" \
|| EXIT_CODE=$?
# --host 127.0.0.1 — without this the workload's open! resolves the
# DynamoDB client hostname from (name node) where node is one of
# default-nodes ["n1" "n2" "n3" "n4" "n5"]; these are virtual labels,
# not real hostnames, and DNS resolution fails with 'nodename nor
# servname provided'. --host overrides via cli/common-cli-opts'
# --host -> :host -> :dynamo-host -> make-ddb-client wiring. Required
# for the single-process two-group topology this script launches —
# every "node" client talks to the same loopback DynamoDB endpoint.

EXIT_CODE=${EXIT_CODE:-0}

Expand Down
Loading