[JAVA-1571] Handle asynchronous aggregate/mapreduce to a collection Created: 26/Nov/14  Updated: 31/Mar/15  Resolved: 23/Dec/14

Status: Closed
Project: Java Driver
Component/s: Query Operations
Affects Version/s: None
Fix Version/s: 3.0.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

Issue Links:
Related

 Description   

There is currently a race condition because the aggregate/mapreduce is asynchronously executed but then a MongoIterable on the collection the results are being written to is returned immediately



 Comments   
Comment by Jeffrey Yemin [ 31/Mar/15 ]

Closing all resolved 3.0.0 issues, as 3.0.0 has been tagged and released.

Comment by Githook User [ 30/Jan/15 ]

Author:

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

Message: Added aggregateToCollection and mapReduceToCollection methods to async MongoCollection API to support
users who just want to know when the operation completed but do not want to immediately iterate the results.

JAVA-1571
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/134a8f94c3a75d5d671555c32c1221d95ee8f2c1

Comment by Githook User [ 30/Jan/15 ]

Author:

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

Message: Added AwaitingWriteOperationIterable to handle race condition when asynchronously aggregating or reducing to a collection

JAVA-1571
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/c93735737be8961639743040a760e14934120d40

Comment by Githook User [ 23/Dec/14 ]

Author:

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

Message: Added aggregateToCollection and mapReduceToCollection methods to async MongoCollection API to support
users who just want to know when the operation completed but do not want to immediately iterate the results.

JAVA-1571
Branch: 3.0.x
https://github.com/mongodb/mongo-java-driver/commit/134a8f94c3a75d5d671555c32c1221d95ee8f2c1

Comment by Githook User [ 23/Dec/14 ]

Author:

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

Message: Added aggregateToCollection and mapReduceToCollection methods to async MongoCollection API to support
users who just want to know when the operation completed but do not want to immediately iterate the results.

JAVA-1571
Branch: 3.0.x
https://github.com/mongodb/mongo-java-driver/commit/6497b61d26a8cc9d32e0865542188be1dfa75938

Comment by Githook User [ 23/Dec/14 ]

Author:

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

Message: Added AwaitingWriteOperationIterable to handle race condition when asynchronously aggregating or reducing to a collection

JAVA-1571
Branch: 3.0.x
https://github.com/mongodb/mongo-java-driver/commit/c93735737be8961639743040a760e14934120d40

Comment by Jeffrey Yemin [ 01/Dec/14 ]

Yes, I'm aware.

Comment by Ross Lawley [ 01/Dec/14 ]

Thats what we did do - but the api becomes unwieldly, so it was reverted.

Comment by Jeffrey Yemin [ 01/Dec/14 ]

I think that we have to take a callback here, at least for $out. Otherwise there is no way for the user to know when a $out aggregation completed except by starting to iterate through the results.

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