Repository navigation
perf(docker): optimize MySQL healthcheck parameters to eliminate startup delay - #20482
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe MySQL healthcheck now runs every second, with a two-second timeout, 30 retries, and a one-second start period. ChangesMySQL healthcheck
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The faster MySQL healthcheck is mergeable after normal checks. No actionable startup regression is established by the available evidence. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The reviewed change does not expand database access or privileges, but substantially reduces tolerance for slow initialization and transient failures. Dependent startup and recovery behavior under prolonged failures remains unverified. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the clock at dawn, Comment |
|
A longer start_period, e.g. 30s, and a higher retries, e.g. 60 are prefered. Everything else in your proposal looks good. |
Summary
Optimizes the MySQL container healthcheck configuration in
docker/docker-compose-base.ymlto eliminate unnecessary startup delays.Closes #20478.
Details
interval: 10sandtimeout: 10s. Even though MySQL is initialized and accepts connections in ~1.4s, Docker waited up to 10s for the first probe before reporting the service healthy.ragflow) wait oncondition: service_healthy, this delayed stack startup by ~5 seconds.interval: 1s,timeout: 2s,retries: 30, andstart_period: 1s, allowing Docker Compose to detect readiness immediately while preserving 30s of failure tolerance.