kv: fix typos (#18626)

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
This commit is contained in:
sundb
2020-07-16 14:19:18 +08:00
committed by GitHub
parent 4bcb022430
commit df60c32286
2 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ func (sb *sandbox) UpdateFlags(key []byte, flags KeyFlags) {
func (sb *sandbox) PutWithFlags(key []byte, flags KeyFlags, value []byte) {
if sb.frozen {
panic("cannot write to a sandbox when it has forked a new sanbox")
panic("cannot write to a sandbox when it has forked a new sandbox")
}
head := sb.getHead()

View File

@ -86,7 +86,7 @@ func (s testMemDBSuite) TestIterator(c *C) {
func (s testMemDBSuite) TestRuntimeAssertion(c *C) {
p := NewSandbox()
p1 := p.Derive()
c.Check(func() { p.Put([]byte{0}, []byte{}) }, Panics, "cannot write to a sandbox when it has forked a new sanbox")
c.Check(func() { p.Put([]byte{0}, []byte{}) }, Panics, "cannot write to a sandbox when it has forked a new sandbox")
c.Check(func() { p.Derive() }, Panics, "cannot start second sandbox")
c.Check(func() { p.Discard() }, Panics, "root sandbox is freezed")
p1.Discard()