Is there a good way to intentionally cause a slow mongo-aggregation operation?

限于喜欢 提交于 2020-01-16 18:01:04

问题


I'd like to test out some erorr handling code, so I'd like to find a consistent way of causing a slow aggregation operation, ideally without needing a lot of data.

For regular mongo queries, {$where: "sleep(10000) && true" } does this well, but mongo aggregations don't support javascript operators.

来源:https://stackoverflow.com/questions/56447145/is-there-a-good-way-to-intentionally-cause-a-slow-mongo-aggregation-operation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!