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

Method MustReopen

internal/btesting/btesting.go:122–131  ·  view source on GitHub ↗

MustReopen reopen the database. Panic on error.

()

Source from the content-addressed store, hash-verified

120
121// MustReopen reopen the database. Panic on error.
122func (db *DB) MustReopen() {
123 if db.DB != nil {
124 panic("Please call Close() before MustReopen()")
125 }
126 db.t.Logf("Reopening bbolt DB at: %s", db.f)
127 indb, err := bolt.Open(db.Path(), 0600, db.o)
128 require.NoError(db.t, err)
129 db.DB = indb
130 db.strictModeEnabledDefault()
131}
132
133// MustCheck runs a consistency check on the database and panics if any errors are found.
134func (db *DB) MustCheck() {

Calls 2

PathMethod · 0.95