Is there some way to acquire an exclusive write lock for a whole Berkeley DB database without having to close it and reopen it using Db::set_lk_exclusive()?

Perhaps using DbEnv::lock_get()? But in this case, how should it be called? I haven't found any examples about it.

Thanks.

有帮助吗?

解决方案

I posted the same question in the Oracle forums and got a reply:

There is no way to get an exclusive write lock on a BDB database if you have already opened it to use page level locking. DbEnv::lock_get(), and the rest of the lock interface, should really only be used if you plan to manage all locks obtained in the environment.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top