Skip to content
Merged
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
16 changes: 3 additions & 13 deletions tools/run_experiment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,11 @@ if [[ "$EXPERIMENT_MODE" == "snapshot" ]]; then
curl -X PUT \
"http://${PRIVATE_IP_OF_THE_SERVER}:6333/collections/benchmark/snapshots/recover" \
--data-raw "{\"location\": \"${SNAPSHOT_URL}\"}"
echo ""
echo "Done recovering collection from snapshot"

collection_url="http://${PRIVATE_IP_OF_THE_SERVER}:6333/collections/benchmark"
collection_status=$(curl -s "$collection_url" | jq -r '.result.status')
counter=0
while [[ "$collection_status" != "green" && "$counter" -lt 5 ]]; do
collection_status=$(curl -s "$collection_url" | jq -r '.result.status')
counter=$(expr $counter + 1)
sleep 1
done

if [[ "$collection_status" == "green" ]]; then
echo "Experiment stage: Done"
else
echo "Experiment interrupted: collection is not ready."
exit 1
fi
echo "Experiment stage: collection status is ${collection_status} after recovery"

fi