Closed apratheek closed 6 years ago
The only reason would be if the key was later deleted using BuntDB. The DB file is an append only log. The key can be present more than once. First as a Set and later as a Delete.
Hi, thanks for the response. I've checked. Seems like there's a race condition between the two instances of the opened file. What happens when one would open 2 connections to the same db store (persisting on disk) and update the file? Would both the connections see the same data or would there be a lag where the other connection would return a Not Found error?
A buntdb file is designed to be opened one at a time. Multiple instances reading to the same file will likely result in stale data, and multiple writes will risk corruption.
Thanks for pointing that out!
Hi, is there any reason why a stored key-value pair is not found even though the key is present in the DB file? My use case is as follows:
Any help would be appreciated. Thanks.