Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion deployment/aliyun/binance-lob-archiver-recovery@.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ AssertPathIsMountPoint=/data
[Service]
Type=oneshot
ExecStart=/opt/monday/bin/monday-rust-lob-recovery-queue drain %i
TimeoutStartSec=0
TimeoutStartSec=7200
TimeoutStopSec=120
Nice=10
IOSchedulingClass=best-effort
IOSchedulingPriority=7
Expand Down
7 changes: 6 additions & 1 deletion deployment/aliyun/host-rust-lob-recovery-queue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,12 @@ drain_market() {
if finalize_passed_running "$running_dir"; then
exit 0
fi
fail "unfinished running recovery job requires manual intervention: $running_dir"
CURRENT_RUNNING_DIR=$running_dir
CURRENT_STEP=unfinished-running
mark_failed "$running_dir" "$CURRENT_STEP" \
"unfinished running recovery job requires manual resume: $running_dir"
CURRENT_RUNNING_DIR=
exit 1
fi
ready_dir=$(oldest_ready_dir)
[[ -n $ready_dir ]] || exit 0
Expand Down
23 changes: 23 additions & 0 deletions deployment/aliyun/test-rust-lob-recovery-queue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ fi
grep -Fq "active V2 controller is required" "$RECOVERY"
grep -Fq 'monday.rust_lob_controller_release.v2' "$RECOVERY"
grep -Fq 'monday.rust_lob_controller_release.v2' "$RECOVERY"
grep -Fxq 'TimeoutStartSec=7200' "$SCRIPT_DIR/binance-lob-archiver-recovery@.service"
grep -Fxq 'TimeoutStopSec=120' "$SCRIPT_DIR/binance-lob-archiver-recovery@.service"
if grep -Fxq 'TimeoutStartSec=0' "$SCRIPT_DIR/binance-lob-archiver-recovery@.service"; then
printf 'recovery oneshot still has unbounded TimeoutStartSec\n' >&2
exit 1
fi
projection_contract='"$ACTIVE_CONTROLLER/deployment/binance-lob-archiver-production-$MARKET.env"'
resolved_contract='secure_regular_file "$installed_env" 0'
obsolete_contract='secure_regular_file "$ENV_FILE" 0'
Expand Down Expand Up @@ -542,4 +548,21 @@ expect_rejected missing-remote-object fixture_drain
unset FIXTURE_OSS_FAIL
[[ $(jq -r .result "$attempt/result.json") == failed ]]
[[ $(sha256sum "$EVIDENCE_ROOT/$RESUME_JOB_ID/result.json" | awk '{print $1}') == "$fixture_old_result_sha" ]]

# An unfinished *.running job with the active identity is marked failed, not
# left as a successful drain. Resume still requires exact identities.
fixture_job 109 running
rm -f "$fixture/payload.calls"
saved_active=$fixture_active_c
fixture_active_c=$fixture_old_c
expect_rejected unfinished-running fixture_drain
fixture_active_c=$saved_active
[[ -d $QUEUE_MARKET_ROOT/$RESUME_JOB_ID.failed ]]
[[ ! -e $QUEUE_MARKET_ROOT/$RESUME_JOB_ID.running ]]
[[ $(jq -r '.result == "failed" and .step == "unfinished-running"' \
"$EVIDENCE_ROOT/$RESUME_JOB_ID/result.json") == true ]]
if grep -Fq -- '--upload-only' "$fixture/payload.calls" 2>/dev/null; then
printf 'unfinished running drain started payload work\n' >&2
exit 1
fi
printf 'Explicit recovery adoption, historical readback, mixed drain and interruption behavior passed\n'
Loading