tidwall / buntdb

BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support
MIT License
4.57k stars 289 forks source link

Why does invalid database appear? #61

Closed liuxingbaoyu closed 4 years ago

liuxingbaoyu commented 4 years ago

Hello, I found that my database is broken. There is only \r at the end of a line, so an invalid database error is reported. I would like to ask why this is the case. Will it happen when multiple processes are open? Thank you!

tidwall commented 4 years ago

A BuntDB database file should only be accessed from one process at a time. Multiple processes writing to the same file at the same time will risk corruption.

liuxingbaoyu commented 4 years ago

Thanks!