Details
Description
1. import_documents() calls sync_documents to create missing doc1 links.
2. There are certain DB operations in sync() which are unrelated to import.
When there are > 200k doc1 entries in DB, we get
OperationalError(1205, "Lock wait timeout exceeded: try restarting transaction")
and one would have to kill the process.