-
Notifications
You must be signed in to change notification settings - Fork 2.3k
raftstore: apply res may be dropped silently #13160
Copy link
Copy link
Closed
Labels
affects-4.0This bug affects 4.0.x versions.This bug affects 4.0.x versions.affects-5.0This bug affects 5.0.x versions.This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.affects-6.0affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-6.2severity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Metadata
Metadata
Assignees
Labels
affects-4.0This bug affects 4.0.x versions.This bug affects 4.0.x versions.affects-5.0This bug affects 5.0.x versions.This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.affects-6.0affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-6.2severity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Bug Report
What version of TiKV are you using?
Versions after 4.0.
What did happened?
In #8487 we changed the way of sending ApplyRes to
try_sendtikv/components/raftstore/src/store/fsm/store.rs
Lines 293 to 302 in 84654c8
In extreme cases, the mailbox of PeerFsms may be full and some of ApplyRes may be lost.
Then some regions that was supposed to created by split can not be actually created here.
tikv/components/raftstore/src/store/fsm/peer.rs
Lines 3596 to 3601 in 84654c8
And as only part of ApplyRes was lost, the range of the original region could still be changed by other admin commands. Then a region that is actually overlapped with current regions can still be created.
tikv/components/raftstore/src/store/fsm/store.rs
Lines 2058 to 2063 in 84654c8
Here is an example:
clear_stale_datatikv/components/raftstore/src/store/fsm/store.rs
Lines 1217 to 1228 in 84654c8