【问题标题】:Change Cosmos DB Graph API timeout更改 Cosmos DB 图形 API 超时
【发布时间】:2019-09-27 12:18:58
【问题描述】:

似乎在 Cosmos DB Gremlin API 中,查询超时设置为 30 秒。有没有已知的方法来增加它?

  • gremlin-driver 3.4.3 中忽略超时
  • 与 Gremlin 控制台 3.4.3 中的 :remote config timeout 的行为相同
  • 提高吞吐量也无济于事
// graph has >200000 vertices
String superSlowQuery = "g.V().repeat(identity()).times(32)";

time(() -> client.submit(superSlowQuery).all().get());
// OperationCanceledException after 31560ms

time(() -> client.submit(superSlowQuery).all().get());
// OperationCanceledException after 35081ms

RequestOptions requestOptions = RequestOptions.build().timeout(120 * 1000).create();
time(() -> client.submit(superSlowQuery, requestOptions).all().get());
// OperationCanceledException after 31656ms

【问题讨论】:

  • 你找到这个答案了吗,在 3.4.3 中看不到它声明这个被忽略,因为它也在寻找这个答案

标签: azure-cosmosdb gremlin azure-cosmosdb-gremlinapi


【解决方案1】:

documentation 中所述,30 秒超时是预定义的,并且没有迹象表明它是可配置的:

遍历超时 — 30 秒 — 超过此时间将取消遍历。 Cosmos DB Graph 是一个 OLTP 数据库,绝大多数遍历都在几毫秒内完成。要在 Cosmos DB Graph 上运行 OLAP 查询,请将 Apache Spark 与 Graph Data Frames 和 Cosmos DB Spark 连接器结合使用。

【讨论】:

    猜你喜欢
    • 2018-06-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-02-21
    • 2018-12-17
    • 2020-06-03
    • 2021-11-08
    • 1970-01-01
    相关资源
    最近更新 更多