can a berkeley database be opened and accessed from multiple programs at the same time?

前端 未结 2 743
野的像风
野的像风 2021-01-06 05:28

according to the Berkeley documentation the Transactional (TS) and the Concurrent Datastore version of the Database, multiple threads may access (and change) the database.

相关标签:
2条回答
  • 2021-01-06 06:04

    Chapter 16: The Locking Subsystem from the reference guide looks promising.

    0 讨论(0)
  • 2021-01-06 06:19

    Some documentation seems to think you can use the same database concurrently from multiple processes as well as from multiple threads. Specifically:

    "Multiple processes, or multiple threads in a single process, can all use the database at the same time as each uses the Berkeley DB library. Low-level services like locking, transaction logging, shared buffer management, memory management, and so on are all handled transparently by the library."

    A cursory read did not shed any light on what BDB uses to control access from multiple processes, but if filesystem locks are used, access from multiple processes on a network filesystems may well be problematic.

    0 讨论(0)
提交回复
热议问题