<class 'pysqlcipher.dbapi2.IntegrityError'>: column doc_id is not unique
Got this traceback while syncing:
2015-03-03 10:30:03,430 - DEBUG - L#53 : leap:write() - 2015-03-03 10:30:03-0300 [-] Unhandled error in Deferred: 2015-03-03 10:30:03,436 - DEBUG - L#53 : leap:write() - 2015-03-03 10:30:03-0300 [-] Unhandled Error 2015-03-03 10:30:03,436 - DEBUG - L#53 : leap:write() - Traceback (most recent call last): 2015-03-03 10:30:03,436 - DEBUG - L#53 : leap:write() - File "/usr/lib/python2.7/threading.py", line 525, in __bootstrap 2015-03-03 10:30:03,437 - DEBUG - L#53 : leap:write() - self.__bootstrap_inner() 2015-03-03 10:30:03,437 - DEBUG - L#53 : leap:write() - File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner 2015-03-03 10:30:03,437 - DEBUG - L#53 : leap:write() - self.run() 2015-03-03 10:30:03,437 - DEBUG - L#53 : leap:write() - File "/usr/lib/python2.7/threading.py", line 505, in run 2015-03-03 10:30:03,437 - DEBUG - L#53 : leap:write() - self.__target(*self.__args, **self.__kwargs) 2015-03-03 10:30:03,437 - DEBUG - L#53 : leap:write() - --- --- 2015-03-03 10:30:03,438 - DEBUG - L#53 : leap:write() - File "/home/drjohn/projetos/leap/test/bitmask_client_0.9alpha_mail/bitmask.venv/local/lib/python2.7/site-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/python/threadpool.py", line 191, in _worker 2015-03-03 10:30:03,438 - DEBUG - L#53 : leap:write() - result = context.call(ctx, function, *args, **kwargs) 2015-03-03 10:30:03,438 - DEBUG - L#53 : leap:write() - File "/home/drjohn/projetos/leap/test/bitmask_client_0.9alpha_mail/bitmask.venv/local/lib/python2.7/site-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 118, in callWithContext 2015-03-03 10:30:03,438 - DEBUG - L#53 : leap:write() - return self.currentContext().callWithContext(ctx, func, *args, **kw) 2015-03-03 10:30:03,438 - DEBUG - L#53 : leap:write() - File "/home/drjohn/projetos/leap/test/bitmask_client_0.9alpha_mail/bitmask.venv/local/lib/python2.7/site-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 81, in callWithContext 2015-03-03 10:30:03,438 - DEBUG - L#53 : leap:write() - return func(*args,**kw) 2015-03-03 10:30:03,439 - DEBUG - L#53 : leap:write() - File "/home/drjohn/projetos/leap/test/bitmask_client_0.9alpha_mail/soledad/client/src/leap/soledad/client/adbapi.py", line 247, in _runInteraction 2015-03-03 10:30:03,439 - DEBUG - L#53 : leap:write() - result = interaction(trans, *args, **kw) 2015-03-03 10:30:03,439 - DEBUG - L#53 : leap:write() - File "/home/drjohn/projetos/leap/test/bitmask_client_0.9alpha_mail/soledad/client/src/leap/soledad/client/adbapi.py", line 218, in _runU1DBQuery 2015-03-03 10:30:03,439 - DEBUG - L#53 : leap:write() - return meth(*args, **kw) 2015-03-03 10:30:03,439 - DEBUG - L#53 : leap:write() - File "/home/drjohn/projetos/leap/test/bitmask_client_0.9alpha_mail/bitmask.venv/local/lib/python2.7/site-packages/u1db-13.09-py2.7.egg/u1db/backends/__init__.py", line 94, in create_doc 2015-03-03 10:30:03,439 - DEBUG - L#53 : leap:write() - return self.create_doc_from_json(json_string, doc_id) 2015-03-03 10:30:03,440 - DEBUG - L#53 : leap:write() - File "/home/drjohn/projetos/leap/test/bitmask_client_0.9alpha_mail/bitmask.venv/local/lib/python2.7/site-packages/u1db-13.09-py2.7.egg/u1db/backends/__init__.py", line 100, in create_doc_from_json 2015-03-03 10:30:03,440 - DEBUG - L#53 : leap:write() - self.put_doc(doc) 2015-03-03 10:30:03,440 - DEBUG - L#53 : leap:write() - File "/home/drjohn/projetos/leap/test/bitmask_client_0.9alpha_mail/soledad/client/src/leap/soledad/client/sqlcipher.py", line 309, in put_doc 2015-03-03 10:30:03,440 - DEBUG - L#53 : leap:write() - doc_rev = sqlite_backend.SQLitePartialExpandDatabase.put_doc(self, doc) 2015-03-03 10:30:03,440 - DEBUG - L#53 : leap:write() - File "/home/drjohn/projetos/leap/test/bitmask_client_0.9alpha_mail/bitmask.venv/local/lib/python2.7/site-packages/u1db-13.09-py2.7.egg/u1db/backends/sqlite_backend.py", line 377, in put_doc 2015-03-03 10:30:03,441 - DEBUG - L#53 : leap:write() - self._put_and_update_indexes(old_doc, doc) 2015-03-03 10:30:03,441 - DEBUG - L#53 : leap:write() - File "/home/drjohn/projetos/leap/test/bitmask_client_0.9alpha_mail/soledad/client/src/leap/soledad/client/sqlcipher.py", line 398, in _put_and_update_indexes 2015-03-03 10:30:03,441 - DEBUG - L#53 : leap:write() - self, old_doc, doc) 2015-03-03 10:30:03,441 - DEBUG - L#53 : leap:write() - File "/home/drjohn/projetos/leap/test/bitmask_client_0.9alpha_mail/bitmask.venv/local/lib/python2.7/site-packages/u1db-13.09-py2.7.egg/u1db/backends/sqlite_backend.py", line 871, in _put_and_update_indexes 2015-03-03 10:30:03,441 - DEBUG - L#53 : leap:write() - (doc.doc_id, doc.rev, doc.get_json())) 2015-03-03 10:30:03,441 - DEBUG - L#53 : leap:write() - pysqlcipher.dbapi2.IntegrityError: column doc_id is not unique
Not sure how to reproduce it deterministically yet, but what I did was:
- Clean the user database.
- Login with client, generate keys, sync.
- Shutdown client.
- Populate database with 100 emails.
- Login with client, wait for sync.
Complete log will be attached.
(from redmine: created on 2015-03-04, closed on 2016-05-04)
- Relations:
- relates #6754
- Uploads: