[JAVA-2338] Cursor holds on to two batches of documents at a time, where only one is necessary Created: 10/Oct/16  Updated: 27/Nov/16  Resolved: 11/Oct/16

Status: Closed
Project: Java Driver
Component/s: Query Operations
Affects Version/s: 3.0.0
Fix Version/s: 3.4.0-rc1, 3.4.0

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

There is a small window where MongoBatchCursorAdapter requests the next batch of results while still referencing the previous batch. This unnecessarily increases the memory requirements of any application that iterates through query results that have multiple batches.



 Comments   
Comment by Githook User [ 11/Oct/16 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-2338: Ensure that the reference to the current batch of results in a cursor is removed before fetching the next batch.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/f5c484b7dd2bd5af99124622eefec0cad20d3f90

Generated at Thu Feb 08 08:56:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.