Skip to content

WriteBatch.Delete() panics on empty key #55

@erikgrinaker

Description

@erikgrinaker

Calling WriteBatch.Delete() with an empty key, i.e. []byte{}, panics:

goroutine 38 [running]:
testing.tRunner.func1.1(0x43ddc60, 0xc0005d4060)
	/usr/local/Cellar/go/1.14/libexec/src/testing/testing.go:941 +0x3d0
testing.tRunner.func1(0xc0005da000)
	/usr/local/Cellar/go/1.14/libexec/src/testing/testing.go:944 +0x3f9
panic(0x43ddc60, 0xc0005d4060)
	/usr/local/Cellar/go/1.14/libexec/src/runtime/panic.go:967 +0x15d
github.com/jmhodges/levigo.(*WriteBatch).Delete.func1(0xc0005c22b0, 0x4744c10, 0x0, 0x0)
	github.com/jmhodges/[email protected]/batch.go:60 +0x84
github.com/jmhodges/levigo.(*WriteBatch).Delete(0xc0005c22b0, 0x4744c10, 0x0, 0x0)
	github.com/jmhodges/[email protected]/batch.go:60 +0x49

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions