Skip to content

Commit

Permalink
Merge pull request #523 from catatsuy/feature-add-restart-mysql-to-ci…
Browse files Browse the repository at this point in the history
…-workflow

Optimize tables before running benchmarks on database
  • Loading branch information
catatsuy committed Aug 12, 2024
2 parents 5c8330e + e0b149c commit 2d3945c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ jobs:
echo "Waiting for database initialization..."
sleep 10
done
sleep 10
# for avoiding "Lock wait timeout exceeded; try restarting transaction" error
docker compose exec -T mysql mysql -uroot -proot -e "OPTIMIZE table posts;" isuconp
docker compose exec -T mysql mysql -uroot -proot -e "OPTIMIZE table users;" isuconp
docker compose exec -T mysql mysql -uroot -proot -e "OPTIMIZE table comments;" isuconp
- name: Run the benchmark
continue-on-error: true
Expand Down

0 comments on commit 2d3945c

Please sign in to comment.