org.mapdb.DBException$PointerChecksumBroken. [2.0-beta13]

23 views
Skip to first unread message

Senhui Lee

unread,
Apr 20, 2016, 3:13:17 AM4/20/16
to MapDB
Hi, guys.  There I had used the MapDB to stored byte array data in hash set data struct. But some times there had throws an strange exception. see below:


org.mapdb.DBException$PointerChecksumBroken: Bit parity in file pointer is broken, data possibly corrupted.
 at org
.mapdb.DataIO.parity4Get(DataIO.java:1149)
 at org
.mapdb.StoreCached.loadLongStackPage(StoreCached.java:248)
 at org
.mapdb.StoreCached.longStackTake(StoreCached.java:179)
 at org
.mapdb.StoreDirect.freeRecidTake(StoreDirect.java:1644)
 at org
.mapdb.StoreDirect.preallocate(StoreDirect.java:595)
 at org
.mapdb.StoreCached.put(StoreCached.java:501)
 at org
.mapdb.Engine$CloseOnJVMShutdown.put(Engine.java:450)
 at org
.mapdb.HTreeMap.putNew(HTreeMap.java:978)
 at org
.mapdb.HTreeMap.putInner(HTreeMap.java:953)
 at org
.mapdb.HTreeMap.put(HTreeMap.java:883)
 at org
.mapdb.HTreeMap$KeySet.add(HTreeMap.java:1278)
 at so
.sao.analytics.sdk.mapdb.MessageStoreDB.push(MessageStoreDB.java:95)



By now my resolve way is delete the MapDB build filed, then restart server again. It's run well. So strange. My MapDB work code like below:

DB db = DBMaker.fileDB(dbFile)
               
.asyncWriteEnable()
               
.transactionDisable()
               
.closeOnJvmShutdown()
               
.make();


Set<byte[]> messages = db.hashSet(topicName, Serializer.BYTE_ARRAY);


messages
.add(byte[]); // also the exception had happened here.





Also I had other question, how can I use one MapDB file in multi threads. Just closed the locked type. all right?


So is there some thing wrong in my code. Wait for you reply. Thanks.

Dmitriy Shabanov

unread,
Apr 20, 2016, 4:06:59 AM4/20/16
to ma...@googlegroups.com
What version do you use?

--
You received this message because you are subscribed to the Google Groups "MapDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Dmitriy Shabanov

Senhui Lee

unread,
Apr 20, 2016, 5:59:51 AM4/20/16
to MapDB
the beta version, it's number 2.0-beta13.

在 2016年4月20日星期三 UTC+8下午4:06:59,Dmitriy Shabanov写道:

Dmitriy Shabanov

unread,
Apr 20, 2016, 7:32:26 AM4/20/16
to ma...@googlegroups.com
It's not supported anymore.

On Wed, Apr 20, 2016 at 12:59 PM, Senhui Lee <elka...@gmail.com> wrote:
the beta version, it's number 2.0-beta13.

--
Dmitriy Shabanov
Reply all
Reply to author
Forward
0 new messages