[JAVA-1253] AggregationOutput should not throw IllegalArgumentException on command failure Created: 21/May/14 Updated: 01/Apr/16 Resolved: 25/Jun/14 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Command Operations |
| Affects Version/s: | 2.12.0 |
| Fix Version/s: | 2.12.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | John Morales | Assignee: | Ross Lawley |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Currently the DBCollection.aggregate(final List<DBObject> pipeline) method which returns an AggregationOutput will throw an IllegalArgumentException to clients. I would instead expect the command result to be checked with CommandResult.throwOnError() as is done for the other overloaded aggregate methods returning a DBCursor. |
| Comments |
| Comment by Githook User [ 01/Aug/14 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Ensure collection.aggregate throws on error
|
| Comment by Githook User [ 25/Jun/14 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Ensure collection.aggregate throws on error
|
| Comment by Martin Skøtt [ 26/May/14 ] |
|
I have experienced the same issue with an aggregation which took a long time to run. Changing the code to use DBCollection.aggregate(final List<DBObject> pipeline, AggregationOptions options) instead fixed the problem for me. |