Open PeterBackman opened 8 years ago
Thanks for the detailed report. This looks like a bug in the elastic2-doc-manager package. I filed issues for this in that project, as well as the old elastic-doc-manager, which has the same problem.
@llvtt, hi, my English is poor, i Used versions: -Elasticsearch 2.3.4 -mongo-connector 2.4.1 -es2-doc-manager 0.2.0 And i have the same issue.
2016-09-14 17:23:12,901 [ERROR] mongo_connector.oplog_manager:570 - OplogThread: caught exception during bulk upsert, re-upserting documents serially Traceback (most recent call last): File "/Library/Python/2.7/site-packages/mongo_connector/oplog_manager.py", line 567, in upsert_all dm.bulk_upsert(docs_to_dump(namespace), mapped_ns, long_ts) File "/Library/Python/2.7/site-packages/mongo_connector/util.py", line 32, in wrapped return f(_args, *_kwargs) File "/Library/Python/2.7/site-packages/mongo_connector/doc_managers/elastic2_doc_manager.py", line 229, in bulk_upsert for ok, resp in responses: File "/Library/Python/2.7/site-packages/elasticsearch/helpers/init.py", line 162, in streaming_bulk for result in _process_bulk_chunk(client, bulk_actions, raise_on_exception, raise_on_error, **kwargs): File "/Library/Python/2.7/site-packages/elasticsearch/helpers/init.py", line 134, in _process_bulk_chunk raise BulkIndexError('%i document(s) failed to index.' % len(errors), errors)
@kevin-xk It looks like you used the --continue-on-error
option and the documents should have been re-inserted one at a time after that (ignoring those documents that fail to insert).
Are you seeing the error again after the initial collection dump completes?
Elasticsearch/Lucene can not handle terms larger then 32K. Trying to insert something bigger in an unanalyzed field will yield an exception from Elasticsearch. When this happens when inserting from mongo-connector the connector will stop.
One malformatted document should not bring the connector to a full stop. It would be better to just log this as an ERROR in the connector log clearly stating what document was unsuccessful.
Used versions: -Elasticsearch 2.3.1 -mongo-connector 2.4 -es2-doc-manager 0.1.0
Log from mongo-connector: