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
I recently encountered a bug where buntdb would crush during shrinking on windows both with latest and 1.2.10, (managed to reproduce consistently, ran on Mac successfully), using the following program:
package main
import (
"fmt"
"log"
"strconv"
"time"
"github.com/tidwall/buntdb"
)
func main() {
db, err := buntdb.Open("data.db")
if err != nil {
log.Fatal(err)
}
defer db.Close()
err = db.Update(func(tx *buntdb.Tx) error {
for i := 0; i < 100000; i++ {
key := "key" + strconv.Itoa(i)
value := "value" + strconv.Itoa(i)
err := tx.Set(key, value, nil)
if err != nil {
return err
}
}
return nil
})
if err != nil {
log.Fatal(err)
}}
I recently encountered a bug where
buntdb
would crush during shrinking on windows both with latest and1.2.10
, (managed to reproduce consistently, ran on Mac successfully), using the following program:and encountered the following stack trace:
(basically, moving the file on windows returned
panic: buntdb: rename mydb.db.tmp mydb.db: Access is denied
and the original file still exists)Is there any workaround I should apply in such cases? Should I manage shrinking ourselves?
Thank!
The text was updated successfully, but these errors were encountered: