Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

fix: mod zero #171

Merged
merged 2 commits into from
May 18, 2023
Merged

fix: mod zero #171

merged 2 commits into from
May 18, 2023

Conversation

chunshao90
Copy link
Contributor

Which issue does this PR close?

Closes #

Rationale for this change

Fix the % 0 bug that may occur during the cluster initialization phase.

What changes are included in this PR?

  • Fix the % 0 bug that may occur during the cluster initialization phase.
  • Refactor PickShards function.
  • Pick shard to random.

Are there any user-facing changes?

No.

How does this change test

CI.

@codecov-commenter
Copy link

codecov-commenter commented May 9, 2023

Codecov Report

Merging #171 (e231110) into main (7f1354e) will decrease coverage by 0.08%.
The diff coverage is 74.19%.

❗ Current head e231110 differs from pull request most recent head 0d8b7a4. Consider uploading reports for the commit 0d8b7a4 to get more accurate results

@@            Coverage Diff             @@
##             main     #171      +/-   ##
==========================================
- Coverage   39.66%   39.59%   -0.08%     
==========================================
  Files          34       34              
  Lines        4213     4213              
==========================================
- Hits         1671     1668       -3     
- Misses       2317     2319       +2     
- Partials      225      226       +1     
Impacted Files Coverage Δ
server/coordinator/factory.go 4.45% <0.00%> (ø)
server/coordinator/shard_picker.go 88.00% <79.31%> (-6.00%) ⬇️

@chunshao90 chunshao90 marked this pull request as draft May 10, 2023 07:10
@chunshao90 chunshao90 marked this pull request as ready for review May 18, 2023 06:11
Copy link
Contributor

@ZuLiangWang ZuLiangWang left a comment

Choose a reason for hiding this comment

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

LGTM

@ZuLiangWang ZuLiangWang merged commit 82ca6a3 into apache:main May 18, 2023
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants