crate / crate/cratedb-toolkit

Cluster API: Improve probe method's error handling and retry logic in ManagedCluster class

Open
#424 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
10
Forks
5
Avg merge
7d 5h
Merged PRs (30d)
7

Description

## Description

This issue proposes improving the method in the class by:

1. Adding retry logic with exponential backoff for transient failures (network issues, timeouts)
2. Implementing more precise error type checking
3. Better handling for different error conditions

## Suggested Implementation

- Add max_retries parameter (default 3)
- Implement exponential backoff for retries
- Distinguish between permanent errors and transient errors
- Only retry on network/connection-related issues
- Add improved logging for retry attempts

## References

- Originally suggested in: https://github.com/crate/cratedb-toolkit/pull/81#discussion_r2062668001

## Requested by

@amotl

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the probe method in the ManagedCluster class and review the related discussion in pull request #81. Trace the current error handling, then define completion against the requested max_retries default, exponential backoff, transient-versus-permanent error distinction, and retry logging.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.