docs(healthz): correct stale 2s timeout comment — no timeout is set#260
Merged
Conversation
The inline comment on the SELECT 1 probe in /healthz claimed "Sequelize uses pg's query_timeout for this on Postgres. 2s is well over the expected sub-ms response..." but no `timeout` / `query_timeout` option is actually passed to `sequelize.query()` — and the Sequelize options bag at the call site doesn't expose a per-query timeout for postgres anyway. The comment has been wrong since the original /healthz PR (#4) and likely misled operators looking for a tunable. Replace the comment with an accurate description of the current behavior (the request hangs until the orchestrator's own probe timeout fires) and a pointer to how to add a real one if it ever matters (`dialectOptions.statement_timeout` in db.config.js). Comment-only change; no behavior change. 688 tests still pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comment-only fix in
app/controllers/healthcontroller.js.The inline comment on the
SELECT 1probe claimed "Sequelize uses pg'squery_timeoutfor this on Postgres. 2s is well over the expected sub-ms response..." but notimeout/query_timeoutoption is actually passed tosequelize.query()— and the Sequelize options bag at the call site doesn't expose a per-query timeout for postgres anyway.The comment has been wrong since the original /healthz PR (#4) and likely misled operators looking for a tunable.
What changed
Replaced the misleading comment with:
dialectOptions.statement_timeoutindb.config.js) if it ever matters in practiceTest plan
npm run lint && npm test— 688 passingProudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/