mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-05-31 11:42:30 +00:00
test: perform check in view(readonly) mode
Signed-off-by: Benjamin Wang <wachao@vmware.com>
This commit is contained in:
parent
0c2c0a257a
commit
b91d901b74
@ -117,7 +117,7 @@ func (db *DB) MustReopen() {
|
|||||||
|
|
||||||
// MustCheck runs a consistency check on the database and panics if any errors are found.
|
// MustCheck runs a consistency check on the database and panics if any errors are found.
|
||||||
func (db *DB) MustCheck() {
|
func (db *DB) MustCheck() {
|
||||||
err := db.Update(func(tx *bolt.Tx) error {
|
err := db.View(func(tx *bolt.Tx) error {
|
||||||
// Collect all the errors.
|
// Collect all the errors.
|
||||||
var errors []error
|
var errors []error
|
||||||
for err := range tx.Check() {
|
for err := range tx.Check() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user