franferta / jdbm2

Automatically exported from code.google.com/p/jdbm2
0 stars 0 forks source link

java.lang.InternalError when retrieveing from a large map #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Create RecordManager
2.create a hashmap( recman.hashMap("lemmas") )
3.put 600 000 pairs of Strings
4.retrieve map.size()

What is the expected output? What do you see instead?

An exception is raised

java.lang.InternalError: bytes left: 31

What version of the product are you using? On what operating system?
jdbm-2.0, Linux

Please provide any additional information below.

Stacktrace :

java.lang.InternalError: bytes left: 31
    at jdbm.htree.HashNode$1.deserialize(HashNode.java:54)
    at jdbm.htree.HashNode$1.deserialize(HashNode.java:39)
    at jdbm.recman.BaseRecordManager.fetch2(BaseRecordManager.java:514)
    at jdbm.recman.BaseRecordManager.fetch(BaseRecordManager.java:478)
    at jdbm.recman.CacheRecordManager.fetch(CacheRecordManager.java:226)
    at jdbm.htree.HashDirectory$HDIterator.prepareNext(HashDirectory.java:527)
    at jdbm.htree.HashDirectory$HDIterator.next2(HashDirectory.java:483)
    at jdbm.htree.HashDirectory$HDIterator.next(HashDirectory.java:565)
    at jdbm.htree.HTreeMap$1.size(HTreeMap.java:173)
    at java.util.AbstractMap.size(AbstractMap.java:67)

Original issue reported on code.google.com by Tomas.Ha...@gmail.com on 2 May 2011 at 11:31

GoogleCodeExporter commented 8 years ago
Thanks for bug report. 
It is an assertion which indicates there may be problem with serialization or 
paging mechanism. 

What type of strings were inserted? Constant, random? Did it contained some non 
ASCII characters?

Original comment by kja...@gmail.com on 2 May 2011 at 1:20

GoogleCodeExporter commented 8 years ago
It's a Slovak lemma dictionary ( form -> lemma ) , so probably more random than 
constant. It does contain non ASCII characters both in the key and value, for 
example "ľšťžáí" etc..

Original comment by Tomas.Ha...@gmail.com on 2 May 2011 at 2:09

GoogleCodeExporter commented 8 years ago
Neposlal by jsi mi ten slovnik? Nemuzu to replikovat.
BTW jsem z Cech :-)

Original comment by kja...@gmail.com on 10 May 2011 at 10:37

GoogleCodeExporter commented 8 years ago
Neposlal by jsi mi ten slovnik? Nemuzu to replikovat.
BTW jsem z Cech :-)

Original comment by kja...@gmail.com on 10 May 2011 at 10:37

GoogleCodeExporter commented 8 years ago
V prilohe posielam zozipovany slovnik v CSV. Prvu hodnotu v subore pouzivam ako 
kluc, druhu ako hodnotu.Pri zapise som flushoval kazdych 1000 zaznamov a 
maximalne sa mi podarilo ulozit 300k, ak som ich ulozil viac tak sa uz citanie 
padlo na "java.lang.InternalError: bytes left: 31"

Original comment by Tomas.Ha...@gmail.com on 11 May 2011 at 7:23

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed SVN rev 73. 

HashBucket decompression was wrong. It was catched by assertion. It is fixed in 
SVN, I expect new release 2.1 in a few days.

Original comment by kja...@gmail.com on 13 May 2011 at 11:27