Skip to content

[Refactor]: Retry client#19

Open
LingKa28 wants to merge 3 commits into
xline-kv:mainfrom
LingKa28:refactor/retry-client
Open

[Refactor]: Retry client#19
LingKa28 wants to merge 3 commits into
xline-kv:mainfrom
LingKa28:refactor/retry-client

Conversation

@LingKa28

@LingKa28 LingKa28 commented Feb 8, 2024

Copy link
Copy Markdown
Contributor

Please briefly answer these questions:

  • what problem are you trying to solve? (or if there's no problem, what's the motivation for this change?)

  • what changes does this pull request make?

  • are there any non-obvious implications of these changes? (does it break compatibility with previous versions, etc)

@LingKa28 LingKa28 added this to the v0.1.2 milestone Feb 8, 2024
@LingKa28 LingKa28 linked an issue Feb 8, 2024 that may be closed by this pull request
4 tasks
@LingKa28 LingKa28 added the Improvement Refactor or optimization, including process, performance or something like that label Feb 8, 2024
@mergify

mergify Bot commented Feb 8, 2024

Copy link
Copy Markdown

⚠️ The sha of the head commit of this PR conflicts with #16. Mergify cannot evaluate rules on this PR. ⚠️

@codecov

codecov Bot commented Feb 8, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.57%. Comparing base (e511f84) to head (53e57c3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
- Coverage   83.66%   83.57%   -0.09%     
==========================================
  Files          18       18              
  Lines        1120     1120              
  Branches       84       84              
==========================================
- Hits          937      936       -1     
- Misses        156      157       +1     
  Partials       27       27              

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

@LingKa28
LingKa28 force-pushed the refactor/retry-client branch from 9915676 to 9dcefe1 Compare February 16, 2024 04:13
@LingKa28
LingKa28 marked this pull request as ready for review February 21, 2024 01:12
Signed-off-by: LingKa <cnfty786@gmail.com>
Signed-off-by: LingKa <cnfty786@gmail.com>
Signed-off-by: LingKa <cnfty786@gmail.com>
@LingKa28
LingKa28 force-pushed the refactor/retry-client branch from 9dcefe1 to 53e57c3 Compare February 24, 2024 07:48

@Phoenix500526 Phoenix500526 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread src/curp/unary.py

raise CurpError(_CurpError(RpcTransport=Empty()))

def update_leader(self, leader_id: int | None, term: int) -> bool:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It seems that there is no lock protects check_and_update_leader.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You may add an additional lock here to protect update_leader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Improvement Refactor or optimization, including process, performance or something like that

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor]: Curp client

3 participants