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(replication): fix wrong memory status block replication #569

Merged
merged 5 commits into from
Nov 13, 2024

Conversation

mattisonchao
Copy link
Member

@mattisonchao mattisonchao commented Nov 13, 2024

Motivation

The follower didn't update the lastAppendedOffset status when the leader truncated the follower, which caused some expected entries to be filtered by deduplication logic and never recovered.

The server will keep printing:

{"level":"warn","time":"2024-11-13T11:38:33.0884113Z","component":"follower-cursor","error":{"error":"rpc error: code = Unknown desc = 20874694 can not immediately follow 20874678: oxia: invalid next offset in wal","kind":"*status.Error","stack":null},"follower":"xxxxxx","namespace":"xxxxxxxx","shard":13,"term":307,"time":"2024-11-13T11:38:33.088438126Z","message":"Error while receiving acks"}

Modification

  • Align lastAppendedOffset alone with internal WAL headOffset.

@merlimat merlimat merged commit ee0a7a4 into main Nov 13, 2024
7 checks passed
@merlimat merlimat deleted the fix.invalid.entry branch November 13, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants