Skip to content

Conversation

@Tochemey
Copy link
Owner

@Tochemey Tochemey commented Dec 27, 2025

  • Refactors SpawnSingleton to be idempotent across leader churn and name conflicts, avoiding false errors when the singleton is already registered.
  • Centralises and simplifies retry behaviour for transient cluster/remoting conditions, improving resiliency without changing public APIs.
  • Adds clearer error handling paths for singleton creation, including role-based placement and leader forwarding.

closes #1036

@TrueBrain
Copy link
Collaborator

TrueBrain commented Dec 27, 2025

All these additions are awesome. I really like the new options! And that I can run SpawnSingleton in an idempotent way makes reasoning about singletons a lot easier (for me at least) :)

One question: the new options, do they also apply during rebalancing? As that still fails with the default partition count of 271 (it works when set to 9) for me.
Edit: I can fully understand if they don't apply to rebalance btw; mostly checking if I am understanding it correct :)

@Tochemey
Copy link
Owner Author

Tochemey commented Dec 27, 2025

All these additions are awesome. I really like the new options! And that I can run SpawnSingleton in an idempotent way makes reasoning about singletons a lot easier (for me at least) :)

One question: the new options, do they also apply during rebalancing? As that still fails with the default partition count of 271 (it works when set to 9) for me. Edit: I can fully understand if they don't apply to rebalance btw; mostly checking if I am understanding it correct :)

can we please chat on the issue rather than on the PR?

@codecov
Copy link

codecov bot commented Dec 27, 2025

Codecov Report

❌ Patch coverage is 93.38843% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.13%. Comparing base (15ed35e) to head (76e58df).

Files with missing lines Patch % Lines
actor/pid.go 28.57% 8 Missing and 2 partials ⚠️
actor/spawn.go 95.45% 2 Missing and 2 partials ⚠️
actor/actor_system.go 93.10% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1038      +/-   ##
==========================================
+ Coverage   93.95%   94.13%   +0.17%     
==========================================
  Files         144      146       +2     
  Lines       11862    12053     +191     
==========================================
+ Hits        11145    11346     +201     
+ Misses        468      459       -9     
+ Partials      249      248       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

bug: singletons fail to relocate on leader leaving a cluster

3 participants