-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Trying to create a new reader (with or without a cache) for a 2,5gb database:
new Reader(file, new CHMCache());
Results in the following exception:
java.lang.IllegalArgumentException: Size exceeds Integer.MAX_VALUE
at java.base/sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:1183)
at com.maxmind.db.BufferHolder.<init>(BufferHolder.java:31)
at com.maxmind.db.Reader.<init>(Reader.java:119)
at com.maxmind.db.Reader.<init>(Reader.java:69)
at app.service.geoip.LocalFilesystemGeoipDataProvider.loadDatabaseReader(LocalFilesystemGeoipDataProvider.java:72)
A quick search of the error message reveals that due to some old standards ByteBuffer size is limited to 2gb.
Is there any workaround or fix for this or is the reader simply unusable with a larger database?
Metadata
Metadata
Assignees
Labels
No labels