issue with $push aggregation operator

0

Hi,

I am unable to use the $push aggregation operator in a pipeline query. The connection seems to hang up after the query is sent. To reproduce it, I used the example in the MongoDb documentation:

https://docs.mongodb.com/manual/reference/operator/aggregation/push/

I changed the $group stage to not use $dayOfYear and $year because these are not supported by DocumentDB, but even then the connection with the DocumentDB seems to break.

When executed through a java client I get:
com.mongodb.MongoSocketReadException: Prematurely reached end of stream

I also tried to execute the query from Mongo DB Compass and mongo shell and it gives similar results. Mongo shell:

E QUERY [thread1] Error: error doing query: failed: network error while attempting to run command 'aggregate' on host 'localhost:27021'

The query looks like this:

db.items.aggregate(
[
  {
       $group:{
  		 _id: { price: "$price"  },
  		 itemsSold: { $push:  { item: "$item", quantity: "$quantity" } }
       }
  }
]
)

Every time the connection seems to hang up.

Is this a known issue or am I doing something wrong. Let me know if you need more info.
Geert.

Edited by: geert on Mar 2, 2019 9:40 AM

Edited by: geert on Mar 2, 2019 9:43 AM

geert
質問済み 5年前447ビュー
3回答
0

Thank you for the feedback. This issue has been fixed in our latest patch. This patch is now available which can be applied to your cluster. Note that upgrading your cluster may cause some downtime. More instructions on upgrading your cluster and details on impact can be found here: https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-maintain.html

AWS
回答済み 5年前
0

Thx. Yes, it works now after applying the update.
Geert.

geert
回答済み 5年前
0

That's great to know. Again, thanks for providing the feedback.

AWS
回答済み 5年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ