You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If at least one element added to the bucket with a value equal to null, then deleting this bucket will raise error: "delete bucket: incompatible value".
Code which reproduce the issue:
package main
import (
"fmt"
bolt "go.etcd.io/bbolt"
)
// Error description:// If at least one element added to the bucket with a value equal to null,// then deleting this bucket will raise error: "delete bucket: incompatible value".funcmain() {
db, _:=bolt.Open("/tmp/bolt.db", 0666, nil)
deferdb.Close()
tx, _:=db.Begin(true)
defertx.Rollback()
bucketName:= []byte("oops")
b, _:=tx.CreateBucket(bucketName)
// putting element with empty value works fineb.Put([]byte("any_key"), nil)
// trying to delete bucket with unexpected errorfmt.Println(tx.DeleteBucket(bucketName))
}
// Error output:// delete bucket: incompatible value
The text was updated successfully, but these errors were encountered:
If at least one element added to the bucket with a value equal to null, then deleting this bucket will raise error: "delete bucket: incompatible value".
Code which reproduce the issue:
The text was updated successfully, but these errors were encountered: