Skip to content
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

Fix/issue 684 #820

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Fix/issue 684 #820

merged 1 commit into from
Jun 26, 2024

Conversation

Phoenix500526
Copy link
Collaborator

@Phoenix500526 Phoenix500526 commented May 15, 2024

Please briefly answer these questions:
Close the issue #664 and #684

@mergify mergify bot requested a review from a team May 15, 2024 12:43
Copy link

mergify bot commented May 15, 2024

@Phoenix500526 Convert your pr to draft since CI failed

@mergify mergify bot marked this pull request as draft May 15, 2024 12:44
@mergify mergify bot added the CI:fail CI has failed label May 15, 2024
Copy link

mergify bot commented May 15, 2024

@Phoenix500526 You've modified the workflows. Please don't forget to update the .mergify.yml.

@mergify mergify bot marked this pull request as ready for review May 15, 2024 13:19
@mergify mergify bot removed the CI:fail CI has failed label May 15, 2024
Copy link

codecov bot commented May 15, 2024

Codecov Report

Attention: Patch coverage is 70.04831% with 62 lines in your changes missing coverage. Please review.

Project coverage is 75.57%. Comparing base (e35b35a) to head (09f1df9).
Report is 132 commits behind head on master.

Files Patch % Lines
crates/xline-client/src/clients/lock.rs 73.97% 38 Missing and 13 partials ⚠️
crates/xlinectl/src/command/lock.rs 0.00% 6 Missing ⚠️
crates/xlinectl/src/command/lease/keep_alive.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #820      +/-   ##
==========================================
+ Coverage   75.55%   75.57%   +0.02%     
==========================================
  Files         180      186       +6     
  Lines       26938    27712     +774     
  Branches    26938    27712     +774     
==========================================
+ Hits        20353    20944     +591     
- Misses       5366     5472     +106     
- Partials     1219     1296      +77     

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

crates/xline-client/examples/lock.rs Outdated Show resolved Hide resolved
crates/xline-client/src/clients/lock.rs Outdated Show resolved Hide resolved
crates/xline-client/src/clients/lock.rs Outdated Show resolved Hide resolved
crates/xline-client/tests/it/lock.rs Outdated Show resolved Hide resolved
crates/xlinectl/src/command/lock.rs Outdated Show resolved Hide resolved
crates/xline-client/src/clients/lock.rs Outdated Show resolved Hide resolved
@mergify mergify bot requested a review from a team May 17, 2024 02:05
Copy link

mergify bot commented May 17, 2024

@Phoenix500526 Convert your pr to draft since CI failed

@mergify mergify bot marked this pull request as draft May 17, 2024 07:33
@mergify mergify bot added the CI:fail CI has failed label May 17, 2024
@Phoenix500526 Phoenix500526 force-pushed the fix/issue-684 branch 2 times, most recently from 1c973bf to dcc89ca Compare May 17, 2024 08:20
@mergify mergify bot marked this pull request as ready for review May 17, 2024 08:31
@mergify mergify bot removed the CI:fail CI has failed label May 17, 2024
Copy link

mergify bot commented May 20, 2024

@Phoenix500526 Your PR is in conflict and cannot be merged.

@mergify mergify bot requested a review from a team May 21, 2024 07:49
Copy link

mergify bot commented May 22, 2024

@Phoenix500526 Your PR is in conflict and cannot be merged.

Copy link
Collaborator

@rogercloud rogercloud left a comment

Choose a reason for hiding this comment

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

Mutex and its guard may be not the best way to abstract. If there's any error happens, such as lease renew failure, lock free is a good point to report error. In the mutex guard abstraction, lock free is in the drop function, which is not possible to handle for the caller.

crates/xline-client/src/clients/lock.rs Outdated Show resolved Hide resolved
crates/xline-client/src/clients/lock.rs Show resolved Hide resolved
crates/xline-client/src/clients/lock.rs Outdated Show resolved Hide resolved
crates/xline-client/src/clients/lock.rs Show resolved Hide resolved
crates/xline-client/examples/lock.rs Outdated Show resolved Hide resolved
@mergify mergify bot requested a review from a team May 22, 2024 16:13
Copy link

mergify bot commented Jun 9, 2024

@Phoenix500526 Convert your pr to draft since CI failed

@mergify mergify bot marked this pull request as draft June 9, 2024 03:26
@mergify mergify bot added the CI:fail CI has failed label Jun 9, 2024
@Phoenix500526 Phoenix500526 force-pushed the fix/issue-684 branch 2 times, most recently from 70d0524 to 7decae5 Compare June 11, 2024 06:32
@mergify mergify bot marked this pull request as ready for review June 11, 2024 06:41
@mergify mergify bot removed the CI:fail CI has failed label Jun 11, 2024
Copy link

mergify bot commented Jun 13, 2024

@Phoenix500526 Your PR is in conflict and cannot be merged.

Copy link

mergify bot commented Jun 18, 2024

@Phoenix500526 Convert your pr to draft since CI failed

@mergify mergify bot marked this pull request as draft June 18, 2024 02:12
@mergify mergify bot added the CI:fail CI has failed label Jun 18, 2024
@mergify mergify bot marked this pull request as ready for review June 18, 2024 02:24
@mergify mergify bot removed the CI:fail CI has failed label Jun 18, 2024
@bsbds
Copy link
Collaborator

bsbds commented Jun 18, 2024

We could guarantee the lock safety by coupling the lock key to every update send to Xline, and the Xline server must verify the validity of the key. Please refer to https://jepsen.io/analyses/etcd-3.4.3

On the client side, we could associate KV operation methods to the lock guard to prevent user from using the lock for other purpose.

@Phoenix500526
Copy link
Collaborator Author

@Mergifyio rebase

Copy link

mergify bot commented Jun 18, 2024

rebase

✅ Branch has been successfully rebased

CrystalAnalyst
CrystalAnalyst previously approved these changes Jun 19, 2024
Copy link
Collaborator

@CrystalAnalyst CrystalAnalyst left a comment

Choose a reason for hiding this comment

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

LGTM.

Closes: xline-kv#664
Signed-off-by: Phoeniix Zhao <Phoenix500526@163.com>
@mergify mergify bot requested a review from a team June 26, 2024 02:50
Copy link
Collaborator

@CrystalAnalyst CrystalAnalyst left a comment

Choose a reason for hiding this comment

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

LGTM

@Phoenix500526 Phoenix500526 merged commit 0295eb2 into xline-kv:master Jun 26, 2024
13 of 14 checks passed
@Phoenix500526 Phoenix500526 deleted the fix/issue-684 branch June 26, 2024 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants