【问题标题】:Update action [REINDEX] cannot be invoked for index with status [INSTALLED]无法为状态为 [INSTALLED] 的索引调用更新操作 [REINDEX]
【发布时间】:2019-06-14 15:59:20
【问题描述】:

我正在关注这个博客: https://developer.ibm.com/dwblog/2018/janusgraph-composite-mixed-indexes-traversals/

代码

gremlin> graph.tx().rollback()
==>null
gremlin> mgmt = graph.openManagement()
==>org.janusgraph.graphdb.database.management.ManagementSystem@19472803
gremlin> code = mgmt.getPropertyKey('code')
==>code
gremlin> mgmt.buildIndex('byCodeComposite', Vertex.class).addKey(code).buildCompositeIndex()
==>byCodeComposite
gremlin> mgmt.commit()
==>null
gremlin> mgmt.awaitGraphIndexStatus(graph, 'byCodeComposite').call()
==>GraphIndexStatusReport[success=False, indexName='byCodeComposite', targetStatus=[REGISTERED], notConverged={}, converged={code=REGISTERED}, elapsed=PT0.012S]

错误:

But i am getting this: ==>GraphIndexStatusReport[success=false, indexName='byCodeComposite', targetStatus=[REGISTERED], notConverged={code=INSTALLED}, converged={}, elapsed=PT1M0.413S]

版本: 卡桑德拉:3.11.3 弹性搜索:6.5.4 janusgraph:0.3.1-hadoop2

我正在尝试解决这个问题,但它不适合我。

【问题讨论】:

    标签: graph-databases janusgraph


    【解决方案1】:

    抱歉,您在关注博客时遇到了问题。

    我注意到的一件事可能不会导致此错误,但可能会导致其他问题是您使用的 Cassandra 和 ES 版本不在 compatibility matrix for 0.3.1 中。

    除此之外,还有一些针对我去年编写的索引的故障排除技巧,但从未有时间发表。希望它有助于解决您的问题。也许我会在不久的将来发布这篇文章的其余部分。

    故障排除索引:

    在创建索引时,如果有任何过时的管理会话或打开的事务,它们索引的索引可能会卡在 INSTALLED 状态。如果您不熟悉 JanusGraph 索引的生命周期,请查看 JanusGraph wiki pages that diagrams the index states and lifecycle

    gremlin> graph.getOpenTransactions()
    ==>standardjanusgraphtx[0x14ba9376]
    ==>standardjanusgraphtx[0x477aaf55]
    

    要回滚所有事务,您可以运行下面的命令,直到它们全部回滚,或者您可以编写一个循环来运行它正确的次数。我个人更喜欢按下并输入几次而不是额外的打字。

    graph.getOpenTransactions().getAt(0).rollback()
    

    要查看是否有任何陈旧的管理实例,您可以运行 getOpenInstances() 方法。这也记录在 JanusGraph 文档的 failure and recovery 部分。如果您看到多个管理实例打开,您可以使用 forceCloseInstance 方法,如下所示。

    gremlin> mgmt = graph.openManagement()
    gremlin> mgmt.getOpenInstances()
    ==>0934f2eb69223-Chriss-MacBook-Pro-2-local2
    ==>0729845962091-remoteMachine1
    gremlin> mgmt.forceCloseInstance('0729845962091-remoteMachine1') 
    gremlin> mgmt.commit()
    

    【讨论】:

      猜你喜欢
      • 2017-12-02
      • 1970-01-01
      • 2020-08-31
      • 2019-12-04
      • 2018-11-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多