Add VerifyTxConsistency to backend.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

Update server/storage/backend/verify.go

Co-authored-by: Benjamin Wang <benjamin.wang@broadcom.com>

Update server/storage/backend/verify.go

Co-authored-by: Benjamin Wang <benjamin.wang@broadcom.com>
This commit is contained in:
Siyuan Zhang
2024-01-31 17:20:04 -08:00
parent 47e9a16a5c
commit 3565a822de
4 changed files with 45 additions and 0 deletions

View File

@ -946,6 +946,7 @@ func (s *EtcdServer) Cleanup() {
func (s *EtcdServer) applyAll(ep *etcdProgress, apply *toApply) {
s.applySnapshot(ep, apply)
s.applyEntries(ep, apply)
backend.VerifyBackendConsistency(s.Backend(), s.Logger(), true, schema.AllBuckets...)
proposalsApplied.Set(float64(ep.appliedi))
s.applyWait.Trigger(ep.appliedi)
@ -2272,6 +2273,7 @@ func (s *EtcdServer) monitorKVHash() {
return
case <-checkTicker.C:
}
backend.VerifyBackendConsistency(s.be, lg, false, schema.AllBuckets...)
if !s.isLeader() {
continue
}