xline-kv / Xline

A geo-distributed KV store for metadata management
https://xline.cloud
Apache License 2.0
562 stars 70 forks source link

refactor: remove read state #857

Open bsbds opened 1 week ago

bsbds commented 1 week ago

Depends-On: #851 #852

Removes the current read state mechanism, and sets all proxied etcd commands to use slow path.

The read state requires the leader to query it's UncommittedPool. However, for every query, we must lock it in another tokio worker thread. Lock in multiple threads could reduce general performance, I think it's best to remove the current implementation and reimplement it in the future.

All etcd commands need to use slow path because we need 2RTTs to acquire a revision.

Please briefly answer these questions:

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 58.33333% with 10 lines in your changes missing coverage. Please review.

Project coverage is 75.61%. Comparing base (e35b35a) to head (ae0401f). Report is 132 commits behind head on master.

Files Patch % Lines
crates/xline/src/server/kv_server.rs 41.17% 6 Missing and 4 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #857 +/- ## ========================================== + Coverage 75.55% 75.61% +0.06% ========================================== Files 180 187 +7 Lines 26938 27618 +680 Branches 26938 27618 +680 ========================================== + Hits 20353 20884 +531 - Misses 5366 5447 +81 - Partials 1219 1287 +68 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mergify[bot] commented 1 week ago

@bsbds Convert your pr to draft since CI failed