-
Notifications
You must be signed in to change notification settings - Fork 25
Follow raftlog update #344
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
Draft
yuezato
wants to merge
20
commits into
frugalos:develop
Choose a base branch
from
yuezato:follow_raftlog_update
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bump version to 0.14.0
Release 0.15.0
Release 0.16.0
10000
Release 0.16.1
Release 0.17.0
Release 0.18.0
Release 0.19.0
Release 1.0.0
Release 1.1.0
Release 1.1.1
Release 1.1.2
Release 1.2.0
Release 1.2.1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ready for Review(の状態通知ですが、出し直します。)
Types of changes
Please check one of the following:
master
anddevelop
!)Description of changes
Behavior
Raftlogの
Io
-traitが新たなメソッドdelete_suffix_from
を要求し、これに対応する実装として
Storage::delete_suffix_from
を追加しています。このメソッドは、LogIndex
from
以降全て `[from..∞)' のsuffix要素を削除するためのものです。これに対応する実装として、追加するコードでは以下のことをします:
log_suffix
を削除しDeleteSuffixRange
futureを作成し、その中でCannylsのrange削除を呼び出します。Purpose
Raftlog側のissue frugalos/raftlog#18 を解決するための
PR frugalos/raftlog#42 によって
RaftlogのIOのインタフェイスが変更になったので、その追従をします。
インタフェイスの変更は、新しいメソッドの追加によるもので
既存コードの変更は不要ですが、コードの追加が必要になります。
参考: https://github.com/frugalos/raftlog/blob/25d663b3e8eda35224cd666e1f1ef05b44ace884/src/io.rs#L89-L91
How to test this PR
追加したメソッドは、Raftlogから特定ケースで呼ばれるのですが、
この特定ケースをFrugalosレベルから再現するのは現時点では困難です。
従って、
frugalos_raft
内部でのユニットテストを提供しています。実装に対して確認したいことがある場合は、可能な限りこのPRをマージする前に、
テストの追加ということで対応したいです。
現時点では以下の項目をテストしています:
不適切な削除はエラーとし、適切な削除で正しく変更されることを確認
これを正しく操作できているかを確認
Checklists
コードの追加
実装コメントの付与
テスト---範囲削除が想定通り動くかだけを直接的に(
frugalos_raft
の中だけで)確認しますエラーハンドリング
Run
cargo fmt --all
.Run
cargo clippy --all --all-targets
.