Skip to content

chore: add defensive check to skip retry when node is starting#679

Merged
ovitrif merged 11 commits intomasterfrom
fix/add-retry-defensive-check
Jan 21, 2026
Merged

chore: add defensive check to skip retry when node is starting#679
ovitrif merged 11 commits intomasterfrom
fix/add-retry-defensive-check

Conversation

@jvsena42
Copy link
Copy Markdown
Member

@jvsena42 jvsena42 commented Jan 20, 2026

Related to #663

This PR adds a defensive check to the node start retry logic to prevent unnecessary retries when the node is already starting or running.

Description

Adds a guard in the .onFailure block of the start() function that checks if nodeLifecycleState.isRunningOrStarting() before triggering a retry. If the node is in a Starting or Running state when an error occurs, the function returns success instead of retrying, which could cause issues like NodeException.AlreadyRunning.

Preview

restart.webm
restore.webm
migration.webm

QA Notes

  1. Run unit tests

    • ./gradlew testDevDebugUnitTest --tests LightningRepoTest
    • Verify start should not retry when node lifecycle state is Starting test passes
  2. Verify the fix

    • The defensive check prevents retry loops when errors occur while the node is starting
    • This complements the existing fix that made sync non-fatal

Base automatically changed from fix/bitkit-not-responding to master January 20, 2026 14:36
@jvsena42 jvsena42 self-assigned this Jan 20, 2026
@claude

This comment has been minimized.

@jvsena42 jvsena42 marked this pull request as draft January 20, 2026 14:41
@jvsena42 jvsena42 changed the title fix: add defensive check to skip retry when node is starting chore: add defensive check to skip retry when node is starting Jan 20, 2026
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jvsena42 jvsena42 marked this pull request as ready for review January 20, 2026 17:00
@claude

This comment has been minimized.

@jvsena42 jvsena42 requested a review from ovitrif January 21, 2026 11:59
@claude

This comment has been minimized.

@claude

This comment has been minimized.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Jan 21, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Copy link
Copy Markdown
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

utAck

@ovitrif ovitrif merged commit 90755ef into master Jan 21, 2026
21 of 23 checks passed
@ovitrif ovitrif deleted the fix/add-retry-defensive-check branch January 21, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants