删除Cosmos DB Graph数据库中的所有边缘超出了RU限制 [英] Deleting all edges in Cosmos DB Graph database exceeds RU limit

查看:90
本文介绍了删除Cosmos DB Graph数据库中的所有边缘超出了RU限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我们在Azure Cosmos DB(Gremlin API)中有一个图表,其中有大约3K顶点和16K边缘。我想删除所有边但保留顶点。



当我运行gremlin查询时,例如  qE()。drop()  I
得到异常

  ExceptionType:RequestRateTooLargeException ExceptionMessage:Message:{" Errors":[" Request rate is large]]} 



当前RU / s限制为3000 RU / s



我理解抛出这样的错误背后的机制。"等待和重试"这里不是一个选项 - 单个查询超过限制而不是很多查询,所以下次我在一段等待期后运行它,我也会得到相同的异常。



问题是我有哪些选项可以尽可能少地查询所有边缘?



我试图运行  qE()。limit(20)。drop() 和
它的工作原理和报告237.62999999999994 RUs


< p style ="padding-right:0px;行高:继承; font-family:Arial,'Helvetica Neue',Helvetica,sans-serif;字体大小:15像素;垂直对齐:基线;明确:两者;颜色:#242729">
当我跑步时 qE()。limit(2000).drop()  I
得到异常。



'gE()。limit(1).drop()'结果显示Azure数据资源管理器中的RU成本不同:

 已执行:gE()。limit(1)。drop()(61.72 RU)
已执行:gE()。limit(1)。drop()(53.14 RUs)
执行:gE()。limit(1)。drop()(61.72 RUs)
执行:gE()。limit(1)。drop()(56 RUs)



但是常数请求费用:546.38



什么是摆脱边缘的最佳方式(在性能和/或成本方面)

解决方案

嗨塞巴斯蒂安,


按照以下Stack Overflow
论坛
,你可以直接在Query Explorer中做很多事情,除了迭代或减少数量而不是完全放弃。


但是,您可以使用
BulkExtractor库
从客户端执行批量操作,其中
BulkDeleteAsync
方法..NET Framework可以正确处理RU阈值问题。


我意识到Stack Overflow主题讨论了丢弃顶点(并且你想丢弃Edges)但讨论点是相同的。


我希望这会有所帮助。





We have a graph in Azure Cosmos DB (Gremlin API) with approx 3K vertices and 16K edges. I would like to drop all edges but keep the vertices.

When I run gremlin query like q.E().drop() I get the exception

ExceptionType : RequestRateTooLargeException ExceptionMessage : Message: {"Errors":["Request rate is large"]}

Current RU/s limit is 3000 RU/s

I understand the mechanism behind throwing such error. The "wait and retry" is not an option here - the limit is exceeded by a single query not by many queries, so the next time I run it after some wait period, I will also get the same exception.

The question is what options do I have to drop all the edges with as little queries as possible?

I was trying to run q.E().limit(20).drop() and it works and reports 237.62999999999994 RUs

When I run q.E().limit(2000).drop() I get the exception.

The 'g.E().limit(1).drop()' results shows varying RU cost in Azure Data Explorer:

Executed: g.E().limit(1).drop() (61.72 RUs)
Executed: g.E().limit(1).drop() (53.14 RUs)
Executed: g.E().limit(1).drop() (61.72 RUs)
Executed: g.E().limit(1).drop() (56 RUs)

But constant Request Charge : 546.38

What would be the optimal way to get rid of the edges (in terms of performance and/or in terms of the cost)

解决方案

Hi Sebastian,

Per the following Stack Overflow forum, there is not much you can do directly in Query Explorer except to iterate or drop in smaller quantities versus doing a full drop.

You could however, use the BulkExtractor library to perform bulk operations from a client, where the BulkDeleteAsync method could be leveraged. The .NET Framework naitively handles RU threshold issues.

I realize the Stack Overflow topic discusses dropping Vertices (and you would like to drop Edges) but the discussion points are the same.

I hope this helps.


这篇关于删除Cosmos DB Graph数据库中的所有边缘超出了RU限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆