Skip to content

check rows.Err() in getDatabases() to prevent partial results. - #3203

Open
mohammednumaan wants to merge 2 commits into
zalando:masterfrom
mohammednumaan:fix-get-databases-rows-error
Open

mohammednumaan wants to merge 2 commits into
zalando:masterfrom
mohammednumaan:fix-get-databases-rows-error

Conversation

@mohammednumaan

@mohammednumaan mohammednumaan commented Oct 19, 2026 •

Copy link
Copy Markdown

this PR does the following:

this change prevents returning a partial database map, avoiding incomplete pooler setup.

  • adds a rows.Err() check after rows.Next() so connection failures during iteration are detected.
  • adds unit tests for the success path and the partial-result error path using a fake sql driver.

here are the files i modified:

  • pkg/cluster/database.go
  • pkg/cluster/database_test.go (this is a new file i created to test the changes).

fixes #3202

Copilot AI balanced review requested due to automatic review settings October 19, 2026 12:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@FxKu FxKu added the bugfix label Oct 20, 2026
@FxKu FxKu added this to the 2.1.0 milestone Oct 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

getDatabases accepts incomplete results and can cache incomplete pooler setup

4 participants