MCPcopy
hub / github.com/etcd-io/bbolt / checkConsistency

Function checkConsistency

concurrent_test.go:253–265  ·  view source on GitHub ↗
(t *testing.T, db *bolt.DB)

Source from the content-addressed store, hash-verified

251}
252
253func checkConsistency(t *testing.T, db *bolt.DB) error {
254 return db.View(func(tx *bolt.Tx) error {
255 cnt := 0
256 for err := range tx.Check() {
257 t.Errorf("Consistency error: %v", err)
258 cnt++
259 }
260 if cnt > 0 {
261 return fmt.Errorf("%d consistency errors found", cnt)
262 }
263 return nil
264 })
265}
266
267/*
268*********************************************************

Callers 1

concurrentReadAndWriteFunction · 0.85

Calls 3

ViewMethod · 0.80
CheckMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected