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
In some cases, bbolt is used by applications like opentelemetry-collector as a kind of persistent queue or cache system. It would be nice if it were possible to configure the maximum size of a bbolt database and return an error when the database needs to grow beyond this size.
The way I see this working is adding a max size field to the Options object, and then checking this maximum size against the requested size sz in the grow() function. If the size requested is larger than the maximum size, return an error similar to what happens when the Truncate call fails. However, it would be good to export this error so that it can be checked by callers to Update/Batch.
I'm happy to do the work but wanted to find out if this is desirable before submitting a PR
The text was updated successfully, but these errors were encountered:
An alternative approach might be to expose the size of the db file in DB.Stats and have the caller check this before and after a write operation. Is is already exposed as DB.Stats().TxStats.GetPageAlloc()?
Hello,
In some cases, bbolt is used by applications like opentelemetry-collector as a kind of persistent queue or cache system. It would be nice if it were possible to configure the maximum size of a bbolt database and return an error when the database needs to grow beyond this size.
The way I see this working is adding a max size field to the Options object, and then checking this maximum size against the requested size
sz
in the grow() function. If the size requested is larger than the maximum size, return an error similar to what happens when the Truncate call fails. However, it would be good to export this error so that it can be checked by callers to Update/Batch.I'm happy to do the work but wanted to find out if this is desirable before submitting a PR
The text was updated successfully, but these errors were encountered: