与neo4j doc manager崩溃的Mongo连接器

时间:2016-07-29 12:00:59

标签: mongodb neo4j

我使用mongo-connector和neo4j_doc_manager将mongodb的数据同步到neo4j,它过去工作得很好但是今天开始出现以下错误。

2016-07-29 17:18:59,558 [CRITICAL] mongo_connector.oplog_manager:549 - Exception during collection dump
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/mongo_connector/oplog_manager.py", line 501, in do_dump
    upsert_all(dm)
  File "/usr/local/lib/python2.7/site-packages/mongo_connector/oplog_manager.py", line 485, in upsert_all
    dm.bulk_upsert(docs_to_dump(namespace), mapped_ns, long_ts)
  File "/usr/local/lib/python2.7/site-packages/mongo_connector/util.py", line 38, in wrapped
    reraise(new_type, exc_value, exc_tb)
  File "/usr/local/lib/python2.7/site-packages/mongo_connector/util.py", line 32, in wrapped
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/mongo_connector/doc_managers/neo4j_doc_manager.py", line 89, in bulk_upsert
    tx.commit()
  File "/usr/local/lib/python2.7/site-packages/py2neo/cypher/core.py", line 306, in commit
    return self.post(self.__commit or self.__begin_commit)
  File "/usr/local/lib/python2.7/site-packages/py2neo/cypher/core.py", line 261, in post
    raise self.error_class.hydrate(error)
  File "/usr/local/lib/python2.7/site-packages/py2neo/cypher/error/core.py", line 54, in hydrate
    error_cls = getattr(error_module, title)
Neo4jOperationFailed: 'module' object has no attribute 'ConstraintValidationFailed'
2016-07-29 17:18:59,563 [ERROR] mongo_connector.oplog_manager:557 - OplogThread: Failed during dump collection cannot recover! 

1 个答案:

答案 0 :(得分:0)

你试图插入与constraints of your Neo4j schema(unicity或存在)不匹配的数据,显然代码不知道如何处理这种类型的错误,尽管它确实给出了它的名字:

  

ConstraintValidationFailed

你应该激活一些日志来查看它试图插入的数据,或者Cypher查询它试图执行的数据。