TITAN : Gremlin query returns inconsistent results on repeated execution

元气小坏坏 提交于 2019-12-05 19:41:01

You didn't say how your deletion occurred, but this issue almost always boils down to a uncommitted or stale transaction. In other words, it's either:

  1. The deleting transaction was not committed
  2. The transaction was committed but the querying side did not start a new transaction and is thus getting cached data.

So, be sure to call g.commit() after you do you graph mutation. Then, when you go to query (in a different context like Rexster Console, Dog House, etc.), be sure to g.rollback() before you query to ensure you aren't reading something stale.

If you're wondering why you would see the removed data in some cases and not others, it's because issuing a request to Rexster might get handled in a thread with a fresh transaction state (or not) giving you differing results.

On the chance that it is neither of these things and possibly a bug, I can only recommend that you update to Titan 0.5.4.

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