[CDRIVER-735] Aggregations executed twice on MongoDB < 2.6 Created: 07/Jul/15  Updated: 19/Oct/16  Resolved: 28/Aug/15

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: 1.2-beta1

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by CDRIVER-227 Aggregation command can optionally re... Closed

 Description   

The driver should check if maxWireVersion >= 1 and if so pass "cursor: {}" to the "aggregate" command. Instead it doesn't check the wire version; it always passes "cursor: {batchSize: 100}" and if it gets an error it tries again without the "cursor" field, doing another round trip on every aggregation.



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

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: leak in collection_aggregate

Introduced while fixing CDRIVER-735.
Branch: 1.3.0-dev
https://github.com/mongodb/mongo-c-driver/commit/7888eed8bf404418a5211e0ba3bad8850d8fdba1

Comment by Githook User [ 11/Jan/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-735 only test allowDiskUse on new mongods

The "aggregate" command only accepts allowDiskUse in mongod 2.6+.
Branch: 1.3.0-dev
https://github.com/mongodb/mongo-c-driver/commit/84907a127eab493beb922e0c48c7966f053c0ed9

Comment by Githook User [ 11/Jan/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-735 fix aggregate test

A reused index variable meant not all of the test was ever run. Also,
remove some test code for MongoDB 2.0, now long obsolete, that might
have masked future regressions.
Branch: 1.3.0-dev
https://github.com/mongodb/mongo-c-driver/commit/35312faa91e4ab29fe3bce01c1ea8e7221d8465f

Comment by Githook User [ 11/Jan/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-735 segfault in aggregate

And update doc for mongoc_topology_select to warn that some pointer
parameters cannot be NULL.
Branch: 1.3.0-dev
https://github.com/mongodb/mongo-c-driver/commit/5607a298f35a403dd446091bcdd4757d4e0fe1d7

Comment by Githook User [ 26/Oct/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: leak in collection_aggregate

Introduced while fixing CDRIVER-735.
Branch: debian
https://github.com/mongodb/mongo-c-driver/commit/7888eed8bf404418a5211e0ba3bad8850d8fdba1

Comment by Githook User [ 08/Sep/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: leak in collection_aggregate

Introduced while fixing CDRIVER-735.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/7888eed8bf404418a5211e0ba3bad8850d8fdba1

Comment by Githook User [ 02/Sep/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-735 only test allowDiskUse on new mongods

The "aggregate" command only accepts allowDiskUse in mongod 2.6+.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/84907a127eab493beb922e0c48c7966f053c0ed9

Comment by Githook User [ 02/Sep/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-735 fix aggregate test

A reused index variable meant not all of the test was ever run. Also,
remove some test code for MongoDB 2.0, now long obsolete, that might
have masked future regressions.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/35312faa91e4ab29fe3bce01c1ea8e7221d8465f

Comment by Githook User [ 02/Sep/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-735 segfault in aggregate

And update doc for mongoc_topology_select to warn that some pointer
parameters cannot be NULL.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/5607a298f35a403dd446091bcdd4757d4e0fe1d7

Comment by Githook User [ 28/Aug/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-735 aggregate uses cursor if wire version > 0
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/346349d8d1e721e782d154df01c1a1935b4d6b90

Comment by Githook User [ 28/Aug/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-735 aggregate shouldn't override default batchSize
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/c9e75914e6456361f13a3443459a6dcd99057d99

Comment by Githook User [ 28/Aug/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-735 show that aggregate ignores wire version
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/79ad44f89d578e23e917d5848fe4f301b938706f

Comment by Githook User [ 28/Aug/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-735 aggregate uses cursor if wire version > 0
Branch: CDRIVER-735-aggregation-wire-version
https://github.com/mongodb/mongo-c-driver/commit/346349d8d1e721e782d154df01c1a1935b4d6b90

Comment by Githook User [ 28/Aug/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-735 aggregate shouldn't override default batchSize
Branch: CDRIVER-735-aggregation-wire-version
https://github.com/mongodb/mongo-c-driver/commit/c9e75914e6456361f13a3443459a6dcd99057d99

Comment by Githook User [ 28/Aug/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-735 show that aggregate ignores wire version
Branch: CDRIVER-735-aggregation-wire-version
https://github.com/mongodb/mongo-c-driver/commit/79ad44f89d578e23e917d5848fe4f301b938706f

Generated at Wed Feb 07 21:10:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.