Skip to content

fix: add stabilization detector to bee struct#5414

Merged
akrem-chabchoub merged 2 commits intomasterfrom
fix/node-warmup
Mar 31, 2026
Merged

fix: add stabilization detector to bee struct#5414
akrem-chabchoub merged 2 commits intomasterfrom
fix/node-warmup

Conversation

@akrem-chabchoub
Copy link
Copy Markdown
Contributor

@akrem-chabchoub akrem-chabchoub commented Mar 27, 2026

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Problem: The warmup detector was built during startup but defer detector.Close() ran when NewBee returned, so it reset to idle while the rest of the node kept using it. The next real traffic restarted monitoring from zero, so warmup could finish twice and readiness looked wrong.

Fix: Align detector lifetime with the node: keep it on Bee, drop the deferred close in NewBee, and call Close() only in Shutdown(). That way warmup state stays valid for the whole run and you avoid a second warmup cycle caused by the accidental reset.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

#5413

Screenshots (if appropriate):

AI Disclosure

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

@akrem-chabchoub akrem-chabchoub self-assigned this Mar 27, 2026
@akrem-chabchoub akrem-chabchoub marked this pull request as ready for review March 30, 2026 08:15
@akrem-chabchoub akrem-chabchoub linked an issue Mar 30, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@acud acud left a comment

Choose a reason for hiding this comment

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

LGTM. Please just fix the PR name (this is not a feature, but fix), and make it shorter so there's no text ellipsis.
Refresher on conventional commits

@akrem-chabchoub akrem-chabchoub changed the title feat(node): add stabilization detector to Bee struct and ensure prope… fix: add stabilization detector to bee struct Mar 30, 2026
Comment thread pkg/node/node.go Outdated
@akrem-chabchoub akrem-chabchoub merged commit 790d338 into master Mar 31, 2026
22 of 23 checks passed
@akrem-chabchoub akrem-chabchoub deleted the fix/node-warmup branch March 31, 2026 14:08
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.

Warmup complete signal arrives twice

4 participants