etcd-io / bbolt

An embedded key/value database for Go.
https://go.etcd.io/bbolt
MIT License
8.31k stars 646 forks source link

Updating file #858

Closed aryehlev closed 5 days ago

aryehlev commented 1 week ago

Bbolt seems like a great option for what I need the issue is that I have an offline process that will probably update the file every hour or so. Is it possible to just change the underlying file? Or would I need to put a lock on the db and reset it?

ahrtr commented 5 days ago

You can update the db file directly, as long as there is no other processes (including bbolt) which open the db file.

But it isn't recommended. The db file is supposed to be only managed by bbolt.