Skip to content

fix: make it possible to set datacenter and workerId intentionally to 0 #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2025

Conversation

CommanderRoot
Copy link
Contributor

With the change in f0dbd16 it's impossible to intentionally set the datacenter or workerId to 0. This change changes the default value to -1 which then sets a random value. Reverting <= 0 to < 0 then allows a user to intentionally set it to 0

With the change in f0dbd16 it's impossible to intentionally set the datacenter or workerId to 0. This change changes the default value to -1 which then sets a random value.
@godruoyi
Copy link
Owner

godruoyi commented May 1, 2025

Great find! Thank you, @CommanderRoot, i love this fix.

@godruoyi godruoyi merged commit b82b313 into godruoyi:master May 1, 2025
6 checks passed
@CommanderRoot CommanderRoot deleted the patch-1 branch May 1, 2025 02:37
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