raftstore: notify stale callbacks before applying (#9136)
raftstore: notify stale callbacks before applying (#9136)

* invoke commit cb in store thread

Signed-off-by: linning <aaf9d94d942451c9c795db41504f2d244ef7f646@gmail.com>

* fix

Signed-off-by: linning <aaf9d94d942451c9c795db41504f2d244ef7f646@gmail.com>

* skip Callback::None

Signed-off-by: linning <aaf9d94d942451c9c795db41504f2d244ef7f646@gmail.com>

* fix

Signed-off-by: linning <aaf9d94d942451c9c795db41504f2d244ef7f646@gmail.com>

* address comment

Signed-off-by: linning <aaf9d94d942451c9c795db41504f2d244ef7f646@gmail.com>

* add test case

Signed-off-by: linning <aaf9d94d942451c9c795db41504f2d244ef7f646@gmail.com>

* address comment

Signed-off-by: linning <aaf9d94d942451c9c795db41504f2d244ef7f646@gmail.com>
BusyJay/tikv,BusyJay/tikv,BusyJay/tikv,c4pt0r/tikv,pingcap/tikv,BusyJay/tikv,pingcap/tikv