-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.1, 1.2
-
Component/s: None
-
None
When inserting a very long list of DBObjects, a bufferoverflow exception is thrown:
Exception in thread "main" java.lang.IllegalArgumentException: tried to save too large of an object. max size : 2098176
at com.mongodb.ByteEncoder.putObject(ByteEncoder.java:175)
at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:203)
at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:162)
at tv.miniweb.mediasearch.indexer.Indexer.Index(Indexer.java:54)
at tv.miniweb.mediasearch.indexer.IndexerLauncher.main(IndexerLauncher.java:53)
This is because a single ByteEncoder is used for the entire .insert request, which is IMO not optimal behaviour in this case. I have pushed a git changeset with a patch and unit tests that fix this.