GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — v2.17.x-emqx: port API changes / backport upstream fixes by keynslug · Pull Request #4 · emqx/ra Conversation
Collaborator
SummaryThis PR builds on top of upstream
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsThe new operation is provided through `force_forget_member/3` function. It's similar in purpose to `force_shrink_members_to_current_member/1` but less radical: allowing to tell a specific member to erase other, likely permanently lost members one-by-one, eventually restoring working quorum and propagating updated cluster membership. This is unsafe, and thus is not exposed in `ra` API. …ollower-badkey-crash fix: handle missing previous_cluster in pre_append_log_follower …l-snapshot-handler fix: handle install_snapshot_rpc in candidate state …ects fix: remove side effects from pre-vote processing …rship-update fix: update membership when reverting cluster change Add proper handling of election-related RPCs during snapshot receiving Partial cherry-pick of 66c590c. …-redirect-client fix: redirect client commands during snapshot transfer When a new leader sends `append_entries` that overwrite existing uncommitted entries in a follower's log (log truncation), the follower must immediately adjust its `last_written_index_term` downwards to reflect the newly truncated state. Previously, `ra_log:write/2` failed to adjust this value during truncation. This caused `ra_server` to report a stale, higher `last_written` index in its `append_entries_reply`. Consequently, the leader could mistakenly advance its `match_index` for that follower and prematurely commit entries that had not actually been persisted to disk, leading to assertion failures or data loss. This commit updates `ra_log:write/2` to calculate the correct `last_written_index_term` when truncation occurs and pass it to the WAL batch writer. It also updates the `?C_RA_SVR_METRIC_LAST_WRITTEN_INDEX` operational metric to ensure metrics stay in sync with the corrected in-memory state. A new test case `follower_aer_stale_last_written` is added to `ra_log_2_SUITE` to verify this behavior. Co-authored-by: Cursor <[email protected]> Wal gap detection fixes Including ignoring return value of ra_lib:sync_dir/1 because it is not supported on windows. …t-close Report errors on segment close instead of silently discarding them This commit ensures there's no concurrent writer workers for the same segments under any circumstances. Before, writer workers were not tied to the lifetime of their parent log segment writer. While it's extremely hard to construct a sequence of events that may cause 2 or more concurrent workers issuing `pwrite`s to the same log segment file under imaginable system and error conditions, better be defensive.
ieQu1
approved these changes
Uh oh!
There was an error while loading. Please reload this page.
3 tasks done
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers1 more reviewerUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |