Is DB thread-safe?

25 views
Skip to first unread message

Hitesh Sajnani

unread,
Aug 9, 2023, 6:23:31 AM8/9/23
to MapDB

Hello team,

I'm passing a same DB object reference to multiple threads, and they all will invoke commit() method. I hope DB object is thread-safe. Please correct me if that is NOT the case.

DB db = DBMaker.fileDB("file.db") .checksumHeaderBypass() .transactionEnable() .closeOnJvmShutdown() .make();

db reference will be passed to multiple threads, and they can invoke commit().

I've also posted this question earlier on https://github.com/jankotek/mapdb/issues/1023 . But didn't get answer yet. So asked here.

Thank you
Hitesh
Reply all
Reply to author
Forward
0 new messages