-
Notifications
You must be signed in to change notification settings - Fork 160
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
Feature: release-0.9: implement TryAsRef<ForwardToLeader> for RaftError #1091
Closed
HaHa421
wants to merge
18
commits into
databendlabs:main
from
HaHa421:release-0.9-impl-forwardtoleader
Closed
Feature: release-0.9: implement TryAsRef<ForwardToLeader> for RaftError #1091
HaHa421
wants to merge
18
commits into
databendlabs:main
from
HaHa421:release-0.9-impl-forwardtoleader
Conversation
This file contains 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
Update the example to return unreachable error for connection errors to prevent immediate retries.
…ng.vote Previously, `Leading.vote.utime()` held the last timestamp acknowledged by a quorum, marking the beginning of the leader lease. The `Leading` struct updates and calculates this timestamp upon receiving an `AppendEntries` reply (includes heartbeat) from a follower. However, the leader's own timestamp was not being updated in this process. With this commit, we now update the leader's timestamp every time the **last-quorum-acked-time** is accessed. This constant recalculation makes storing the timestamp in `Leading.vote` unnecessary, hence it has been removed to streamline the code.
Previously, the heartbeat results were not sent back to `RaftCore`, which requires these results to calculate the **last timestamp acknowledged by a quorum**. This commit resolves the issue by ensuring that the heartbeat RPC results are sent back to `RaftCore`, allowing it to correctly update the **last timestamp acknowledged by a quorum**.
`RaftMetrics::millis_since_quorum_ack` is the interval in milliseconds since the last timestamp a quorum acknowledged. This duration is used by the application to assess the likelihood that the leader has lost synchronization with the cluster. A longer duration without acknowledgment may suggest a higher probability of the leader being partitioned from the cluster.
…r_metrics_and_data_metrics`
…erverMetrics` This commit addresses an issue where `RaftMetrics` could be sent before `RaftDataMetrics` and `RaftServerMetrics`. Since `Wait` relies solely on `RaftMetrics` to reflect the latest state, it is crucial that `RaftMetrics` are dispatched only after the other two metrics have been updated. This change guarantees that once a change in `RaftMetrics` is detected, it accurately represents the most recent changes from both `RaftDataMetrics` and `RaftServerMetrics`.
HaHa421
changed the title
Release 0.9 implement TryAsRef<ForwardToLeader> for RaftError
Feature: release-0.9 implement TryAsRef<ForwardToLeader> for RaftError
Apr 7, 2024
HaHa421
changed the title
Feature: release-0.9 implement TryAsRef<ForwardToLeader> for RaftError
Feature: release-0.9: implement TryAsRef<ForwardToLeader> for RaftError
Apr 7, 2024
@HaHa421 https://github.com/datafuselabs/openraft/releases/tag/v0.9.4 And you can just use it on crates.io: |
Ok thanks :)
Le lun. 8 avr. 2024 à 08:07, 张炎泼 ***@***.***> a écrit :
… @HaHa421 <https://github.com/HaHa421>
You do not need to re-write it for release-0.9
I already shipped it to 0.9.4:
https://github.com/datafuselabs/openraft/releases/tag/v0.9.4
And you can just use it on crates.io:
https://crates.io/crates/openraft/0.9.4
—
Reply to this email directly, view it on GitHub
<#1091 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBH4RJB3DLSYEYELXT7ZBULY4IX2HAVCNFSM6AAAAABF3TBUWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRHEZTENJVGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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.
this should backport the main pull request to v0.9
This change is