jankotek / mapdb

MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap-memory. It is a fast and easy to use embedded Java database engine.
https://mapdb.org
Apache License 2.0
4.89k stars 873 forks source link

When I execute db.commit() I get an alarm:Could not delete file: #1041

Open tianyawenke opened 8 months ago

tianyawenke commented 8 months ago

Here's my parameter configuration:

DB db = DBMaker .fileDB("db/my_20240205.db") .fileMmapEnable() .closeOnJvmShutdown() .checksumHeaderBypass() .transactionEnable() .make();

When I execute db.commit() I get an alarm:

org.mapdb.volume.Volume deleteFile warn: Could not delete file: db\my_20240205.db.wal.0

My environment information: Windows 10, the program started with the administrator user right.

My goal is to add, delete, and change multiple maps, commit a transaction, or roll back after any problems, all of which must succeed or fail. What should I do?

tianyawenke commented 8 months ago

When I don't turn on the transaction, performance: 2us After the transaction is enabled, it may also be the cause of the alarm, and the performance drops to tens of us. I have called db.commit() once every time I modified a batch of data, am I doing something wrong? I hope that the performance will be close to when it is not turned on after opening the transaction.