Skip to content

Fix connection string and gossip timeout documentation#483

Merged
w1am merged 4 commits intomasterfrom
fix/gossip-timeout-docs
Apr 14, 2026
Merged

Fix connection string and gossip timeout documentation#483
w1am merged 4 commits intomasterfrom
fix/gossip-timeout-docs

Conversation

@w1am
Copy link
Copy Markdown
Collaborator

@w1am w1am commented Apr 14, 2026

Fix gossipTimeout description which incorrectly stated the gossip call will be retried on timeout. It actually moves on to the next candidate endpoint.

Clarify that kurrentdb+discover:// only uses a single DNS endpoint. If multiple hosts are specified, only the first is used and the rest are ignored. Recommend kurrentdb:// with multiple gossip seeds for redundancy when individual node addresses are known.

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Fix gossipTimeout documentation accuracy

📝 Documentation

Grey Divider

Walkthroughs

Description
• Corrects gossipTimeout parameter documentation
• Clarifies behavior on timeout: tries next endpoint
• Removes incorrect "will be retried" statement
Diagram
flowchart LR
  A["gossipTimeout docs"] -- "incorrect: will be retried" --> B["Old description"]
  A -- "correct: next endpoint tried" --> C["Updated description"]
Loading

Grey Divider

File Changes

1. docs/api/getting-started.md 📝 Documentation +1/-1

Correct gossipTimeout timeout behavior documentation

• Updated gossipTimeout parameter description in connection string parameters table
• Changed from "will be retried" to "next candidate endpoint will be tried"
• Clarifies actual timeout behavior for gossip calls

docs/api/getting-started.md


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review bot commented Apr 14, 2026

Code Review by Qodo

🐞 Bugs (1)   📘 Rule violations (0)   📎 Requirement gaps (0)
🐞\ ⚙ Maintainability (1)

Grey Divider


Remediation recommended

1. Misleading gossipTimeout docs 🐞
Description
The new gossipTimeout description implies a timeout always moves to the “next candidate endpoint”,
but DNS/+discover discovery uses a single candidate and instead retries the discovery loop (after
discoveryInterval) up to maxDiscoverAttempts, potentially hitting the same endpoint again. This
can mislead users about how timeouts behave in the DNS discovery mode documented just above the
parameter table.
Code

docs/api/getting-started.md[78]

+| `gossipTimeout`       | Number                                            | `5`      | Gossip timeout in seconds. If the gossip call times out, the next candidate endpoint will be tried.                                            |
Evidence
The docs claim that on timeout the client will try the “next candidate endpoint”. In the
implementation, candidates are either the provided endpoints list or a single-element list
[settings.discover] for DNS/+discover mode; gossip call failures are handled by continuing to the
next candidate in the for loop. When all candidates are exhausted, the code waits
discoveryInterval and retries the entire discovery loop until maxDiscoverAttempts is reached—so
with a single candidate there is no “next endpoint” to move to within the same attempt, only a later
retry of the loop.

docs/api/getting-started.md[52-78]
packages/db-client/src/Client/discovery.ts[32-76]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`docs/api/getting-started.md` states that when a gossip call times out, the client will try the next candidate endpoint. That is true when multiple endpoints are provided, but DNS/+discover mode constructs a single candidate and instead retries the discovery loop after `discoveryInterval` (up to `maxDiscoverAttempts`). The current wording is therefore incomplete/misleading for the DNS discovery mode documented in the same section.

## Issue Context
Discovery logic iterates candidates, then delays and repeats the discovery attempt loop. In DNS/+discover mode, the candidate list is a single entry (`[settings.discover]`).

## Fix Focus Areas
- docs/api/getting-started.md[70-79]

## Proposed documentation tweak (example)
Update the `gossipTimeout` description to something like:
- "Gossip timeout in seconds. If a gossip call times out, the client will try the next candidate endpoint (if configured) and continue discovery attempts (up to `maxDiscoverAttempts`, waiting `discoveryInterval` between attempts)."

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@w1am w1am force-pushed the fix/gossip-timeout-docs branch from f19e659 to 72733a5 Compare April 14, 2026 06:30
@w1am w1am force-pushed the fix/gossip-timeout-docs branch 2 times, most recently from 5c2959e to f07fbb7 Compare April 14, 2026 06:32
@w1am w1am changed the title Fix gossipTimeout documentation Fix connection string documentation Apr 14, 2026
@w1am w1am force-pushed the fix/gossip-timeout-docs branch from f07fbb7 to 4996e3a Compare April 14, 2026 06:35
@w1am w1am force-pushed the fix/gossip-timeout-docs branch from 612a879 to 67bdd12 Compare April 14, 2026 06:38
@w1am w1am added cherry-pick:release/v1.0 Cherry picks PR into v1.0 release branch cherry-pick:release/legacy/v6.2 Cherry picks PR into legacy v6.2 release branch cherry-pick:release/v1.1 Cherry picks PR into v1.1 release branch cherry-pick:release/v1.2 labels Apr 14, 2026
@w1am w1am force-pushed the fix/gossip-timeout-docs branch from 382ba4f to c436644 Compare April 14, 2026 06:42
@w1am w1am changed the title Fix connection string documentation Fix connection string and gossip timeout documentation Apr 14, 2026
@w1am w1am merged commit 33ee0df into master Apr 14, 2026
1 check passed
@w1am w1am deleted the fix/gossip-timeout-docs branch April 14, 2026 12:00
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

@w1am 👉 Created pull request targeting release/v1.0: #484

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🚨 @w1am Failed to create cherry Pick PR due to error:

RequestError [HttpError]: Merge conflict
   at /home/runner/work/_actions/kurrent-io/Automations/master/cherry-pick-pr-for-label/node_modules/@octokit/request/dist-node/index.js:66:23
   at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
 status: '409',
 headers: {
   'access-control-allow-origin': '*',
   'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
   'content-length': '127',
   'content-security-policy': "default-src 'none'",
   'content-type': 'application/json; charset=utf-8',
   date: 'Tue, 14 Apr 2026 12:01:21 GMT',
   'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
   server: 'github.com',
   'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
   vary: 'Accept-Encoding, Accept, X-Requested-With',
   'x-accepted-github-permissions': 'contents=write',
   'x-content-type-options': 'nosniff',
   'x-frame-options': 'deny',
   'x-github-api-version-selected': '2022-11-28',
   'x-github-media-type': 'github.v3; format=json',
   'x-github-request-id': '5001:EF72B:124E4F5:4BFA7D6:69DE2C90',
   'x-ratelimit-limit': '5000',
   'x-ratelimit-remaining': '4949',
   'x-ratelimit-reset': '1776171662',
   'x-ratelimit-resource': 'core',
   'x-ratelimit-used': '51',
   'x-xss-protection': '0'
 },
 request: {
   method: 'POST',
   url: 'https://api.github.com/repos/kurrent-io/KurrentDB-Client-NodeJS/merges',
   headers: {
     accept: 'application/vnd.github.v3+json',
     'user-agent': 'octokit-core.js/3.3.2 Node.js/20.20.1 (linux; x64)',
     authorization: 'token [REDACTED]',
     'content-type': 'application/json; charset=utf-8'
   },
   body: '{"base":"cherry-pick-cherry-pick/483/fix/gossip-timeout-docs-release/legacy/v6.2-d5c5af82-c632-440c-88bf-a171d862be09","commit_message":"Merge 4996e3acdbf3b4190fb28836c74fd09b734134d0 into cherry-pick-cherry-pick/483/fix/gossip-timeout-docs-release/legacy/v6.2-d5c5af82-c632-440c-88bf-a171d862be09 [skip ci]\\n\\n\\nskip-checks: true\\n","head":"4996e3acdbf3b4190fb28836c74fd09b734134d0"}',
   request: { agent: [Agent], hook: [Function: bound bound register] }
 },
 documentation_url: 'https://docs.github.com/rest/branches/branches#merge-a-branch'
}

🚨👉 Check https://github.com/kurrent-io/KurrentDB-Client-NodeJS/actions/runs/24397734483

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

@w1am 👉 Created pull request targeting release/v1.1: #485

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

@w1am 👉 Created pull request targeting release/v1.2: #486

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

Labels

cherry-pick:release/legacy/v6.2 Cherry picks PR into legacy v6.2 release branch cherry-pick:release/v1.0 Cherry picks PR into v1.0 release branch cherry-pick:release/v1.1 Cherry picks PR into v1.1 release branch cherry-pick:release/v1.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant