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 the bug because of enqueueing an unchecked commit task #278

Closed
TheR1sing3un opened this issue Mar 9, 2023 · 0 comments · Fixed by #280
Closed

Fix the bug because of enqueueing an unchecked commit task #278

TheR1sing3un opened this issue Mar 9, 2023 · 0 comments · Fixed by #280

Comments

@TheR1sing3un
Copy link
Contributor

case:

n1(leader) : | 0| 1| 2| 3| 4|
n2(follower): | 0| 1| 2| 3| 4|
n3(follower): | 0|

n1 will append log[1] and commitIndex[4] to n3.

image

n3 will append log[1], and directly enqueue a commit task with commitIndex[4] to stm caller.

image

now logs in n3 like that:
n3(follower): | 0| 1|

image

stm will apply task iterator from lastAppliedIndex[0] to commitIndex[4]

image

but n3 only has logs up to index[1], so it will failed because of visit log which is out of range

image

image

TheR1sing3un added a commit to TheR1sing3un/dledger that referenced this issue Mar 9, 2023
1. fix the bug because of enqueueing an unchecked commit task

Closes openmessaging#278
TheR1sing3un added a commit to TheR1sing3un/dledger that referenced this issue Mar 10, 2023
1. remove some high frequency log

Closes openmessaging#278
RongtongJin pushed a commit that referenced this issue Mar 10, 2023
…sk (#279)

* fix(core): fix the bug because of enqueueing an unchecked commit task

1. fix the bug because of enqueueing an unchecked commit task

Closes #278

* refactor(core): remove some high frequency log

1. remove some high frequency log

Closes #278
TheR1sing3un added a commit to TheR1sing3un/dledger that referenced this issue Mar 10, 2023
1. fix commit without check

Closes openmessaging#278
RongtongJin pushed a commit that referenced this issue Mar 10, 2023
1. fix commit without check

Closes #278
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 a pull request may close this issue.

1 participant