[CDRIVER-265] combine collection_aggregate and collection_aggregate_legacy Created: 22/Nov/13  Updated: 05/Dec/13  Resolved: 03/Dec/13

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 0.90.0

Type: Task Priority: Major - P3
Reporter: Mira Carey Assignee: Christian Hergert
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Fix up mongoc_collection_aggregate so that it also covers the mongoc_collection_aggregate_legacy use case.

This may require a synthetic kind of cursor to pull everything in under the same api



 Comments   
Comment by Christian Hergert [ 03/Dec/13 ]

Thanks! Fixed in master.

Comment by Mira Carey [ 27/Nov/13 ]

There's some other small fixes in there, as well as a cursor interface that makes the new aggregate stuff work.

It was tricky enough that I figured I'd get a code review before throwing it into master

https://github.com/hanumantmk/libmongoc/commit/a52518682af2e9d07a325cb2991180862d7a7381

Comment by Mira Carey [ 26/Nov/13 ]

I just realized that all of the new aggregate command stuff is broken.

  • We had max wire version at 0 and we checked each node (including those without streams) for max wire version, so we always had client->cluster.wire_version == 0
  • We always failed on the new aggregate command
    • cursor is a subdocument now with a batchSize param
    • We didn't fulfill the api, but assumed we were talking to a legacy mongod, so tests passed
  • The new version returns a cursor object, with the number of documents in the earlier provided batchSize param

I'll get it sorted, but this task is actually all of the new aggregate functionality

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