salortiz / LMDB_File

Perl wrapper around the OpenLDAP's LMDB
Other
8 stars 12 forks source link

Fix tests on ppc64[le] architecture #29

Closed kubco2 closed 6 years ago

kubco2 commented 6 years ago

Removed test that checks default page size, because it is not consistent for all platforms, this default value should be somehow determined out of this library.

Increased map size of database, because on ppc64 it is not able to store 1MB of data into 1MB big database. This could be a bug. If on x86_64 it is able to store 1MB to 1MB big database but not possible on ppc64[le].

Solves issue #28.

kubco2 commented 6 years ago

I was looking into mapsize more and i think, that it is about some metadata and probably it is not bug, just not enought space. default mapsize = 1048576 data size to save = 1000000 There is 48576 free. With 4096 page size it means 11 free pages. If I set mapsize with page size 4096 to 1024 1024 - 48576 + 4096 5 tests pass. With less they dont. If I set mapsize with page size 32768 to 1024 1024 - 48576 + 32768 5 tests pass. With less they dont. So I think that 5pages are used for metadata. Because of there were still 11 pages free with 4096 pagesize, tests succeed. But with 32768 pagesize there were only 1 page free, tests failed.