Skip to content

Document that automatic recovery is not guaranteed after the permanent failure - #4771

Merged
ggivo merged 1 commit into
masterfrom
docs/multidb-permanent-failure
Oct 5, 2026
Merged

ggivo merged 1 commit into
masterfrom
docs/multidb-permanent-failure

Conversation

@ggivo

@ggivo ggivo commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #4756 and #4765.

What

Documents that Jedis gives no guarantee of automatic recovery after JedisPermanentlyNotAvailableException, that user action is required, and that recreating the client is the recommended way to recover.

Why

Once the failover attempts are exhausted the client may or may not resume on its own. The docs did not say so, and ended with a paragraph implying that Jedis switches to another database in both the temporary and the permanent case. The MultiDbConfig Javadocs for maxNumFailoverAttempts and delayInBetweenFailoverAttempts also described the settings inaccurately ("before giving up", and an attempts example that does not match the code).

Changes

  • docs/failover.md: the maxNumFailoverAttempts row, the "When no database is available" section (temporary vs permanent), and a troubleshooting entry for JedisPermanentlyNotAvailableException.
  • JedisPermanentlyNotAvailableException and JedisTemporarilyNotAvailableException Javadocs.
  • MultiDbConfig: Javadocs of the two settings, field and builder.
  • MultiDbClient: class Javadoc.

Documentation only, no behavior change, so no release-notes entry.


Note

Low Risk
Documentation and Javadoc only; no production code or behavior changes.

Overview
Documentation-only follow-up that clarifies MultiDb failover behavior when every database is down, with no runtime changes.

docs/failover.md now states that automatic recovery is not guaranteed after JedisPermanentlyNotAvailableException, splits guidance for temporary vs permanent “no healthy database” failures, and adds a troubleshooting section (recreate the client, tune maxNumFailoverAttempts / delayInBetweenFailoverAttempts). It removes wording that implied Jedis would keep switching databases on its own in both cases.

Javadoc is aligned across MultiDbClient, MultiDbConfig (fields and builder for the two failover-attempt settings), and JedisFailoverException nested types: temporary failures keep auto-retry; permanent failures require operator action and creating a new client is the recommended recovery path. The maxNumFailoverAttempts / delay docs are corrected to describe counted temporary attempts (not misleading “give up” / attempt-count examples).

Reviewed by Cursor Bugbot for commit f1b398e. Bugbot is set up for automated code reviews on this repo. Configure here.

…t failure

After JedisPermanentlyNotAvailableException the client may or may not
resume on its own. State that clearly, and that user action is required:
check the databases and create a new client.

Clarify in the failover guide, the exception, MultiDbConfig and
MultiDbClient docs what the temporary and permanent phases mean, how
maxNumFailoverAttempts and delayInBetweenFailoverAttempts define how
long an outage is temporary, and replace the misleading attempts
example in the MultiDbConfig Javadoc.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T11:01:23.596600Z f1b398e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Test Results

  206 files  ±0    206 suites  ±0   8m 8s ⏱️ -2s
8 121 tests ±0  8 053 ✅ ±0  68 💤 ±0  0 ❌ ±0 
8 141 runs  ±0  8 073 ✅ ±0  68 💤 ±0  0 ❌ ±0 

Results for commit f1b398e. ± Comparison against base commit 475871e.

♻️ This comment has been updated with latest results.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1b398e73d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/failover.md Resolved

@atakavci atakavci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@ggivo
ggivo merged commit 7e1f878 into master Oct 5, 2026
19 of 25 checks passed
ggivo added a commit that referenced this pull request Oct 6, 2026
…anteed after the permanent failure (#4776)

Document that automatic recovery is not guaranteed after the permanent failure (#4771)

After JedisPermanentlyNotAvailableException the client may or may not
resume on its own. State that clearly, and that user action is required:
check the databases and create a new client.

Clarify in the failover guide, the exception, MultiDbConfig and
MultiDbClient docs what the temporary and permanent phases mean, how
maxNumFailoverAttempts and delayInBetweenFailoverAttempts define how
long an outage is temporary, and replace the misleading attempts
example in the MultiDbConfig Javadoc.

(cherry picked from commit 7e1f878)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants