#6185 duplicate key error index: project-data.forum_post.$_id_

v1.0.0
closed
General
nobody
2015-08-20
2013-05-01
No
Traceback (most recent call last):
  File "/var/local/allura/Allura/allura/model/monq_model.py", line 254, in __call__
    self.result = func(*self.args, **self.kwargs)
  File "/var/local/forge-classic/sfx/tasks.py", line 18, in migrate_project
    migrator.migrate()
  File "/var/local/forge-classic/sfx/lib/migrate.py", line 334, in migrate
    ThreadLocalORMSession.flush_all()
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.3.3dev_20130322-py2.7.egg/ming/odm/odmsession.py", line 196, in flush_all
    sess.flush()
  File "/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.2-py2.7.egg/timermiddleware/__init__.py", line 116, in wrapper
    return self.run_and_log(func, inst, *args, **kwargs)
  File "/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.2-py2.7.egg/timermiddleware/__init__.py", line 125, in run_and_log
    return func(*args, **kwargs)
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.3.3dev_20130322-py2.7.egg/ming/odm/base.py", line 29, in inner
    result = func(obj, *args, **kwargs)
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.3.3dev_20130322-py2.7.egg/ming/odm/odmsession.py", line 54, in flush
    self.uow.flush()
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.3.3dev_20130322-py2.7.egg/ming/odm/unit_of_work.py", line 44, in flush
    inow(obj, st)
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.3.3dev_20130322-py2.7.egg/ming/odm/base.py", line 29, in inner
    result = func(obj, *args, **kwargs)
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.3.3dev_20130322-py2.7.egg/ming/odm/odmsession.py", line 66, in insert_now
    mapper(obj).insert(obj, st, self, **kwargs)
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.3.3dev_20130322-py2.7.egg/ming/odm/base.py", line 29, in inner
    result = func(obj, *args, **kwargs)
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.3.3dev_20130322-py2.7.egg/ming/odm/mapper.py", line 55, in insert
    session.impl.insert(doc, validate=False)
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.3.3dev_20130322-py2.7.egg/ming/session.py", line 22, in wrapper
    return func(self, doc, *args, **kwargs)
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.3.3dev_20130322-py2.7.egg/ming/session.py", line 148, in insert
    bson = self._impl(doc).insert(data, safe=kwargs.get('safe', True))
  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.4.2-py2.7-linux-x86_64.egg/pymongo/collection.py", line 359, in insert
    continue_on_error, self.__uuid_subtype), safe)
  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.4.2-py2.7-linux-x86_64.egg/pymongo/mongo_client.py", line 844, in _send_message
    rv = self.__check_response_to_last_error(response)
  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.4.2-py2.7-linux-x86_64.egg/pymongo/mongo_client.py", line 785, in __check_response_to_last_error
    raise DuplicateKeyError(details["err"])
DuplicateKeyError: (u'E11000 duplicate key error index: project-data.forum_post.$_id_  dup key: { : "3631830@import" }', "doc:  {'import_id': u'/projects/asteriskathome/forums/forum/420324/topic/1462557?message=3631830', 'status': 'ok', 'tool_version': {'Discussion': '0.0'}, 'deleted': False, 'text': u'anyone know why there is constant static on one of my fxo modules? it was working fine yesterday. its not the line because i pluged another working line into it and it does the samething.', 'labels': [], 'app_id': ObjectId('51812e3c34309d5b6a2fc90d'), 'thread_id': '2d0957a6', 'discussion_id': ObjectId('51812e3e34309d5b6a2fc911'), 'mod_date': datetime.datetime(2013, 5, 1, 15, 23, 49, 199173), 'app_config_id': ObjectId('51812e3c34309d5b6a2fc90d'), 'last_edit_date': None, 'slug': 'a51a', 'flagged_by': [], 'edit_count': 0, 'last_edit_by_id': ObjectId('5181338434309d5b6a30c858'), 'acl': [], 'parent_id': None, 'full_slug': '20060315231636:a51a', 'version': 0, 'flags': 0, 'timestamp': datetime.datetime(2006, 3, 15, 23, 16, 36), 'author_id': ObjectId('50b6eb91e88f3d0c0a5a295b'), '_id': '3631830@import'}")

Discussion

  • Dave Brondsema

    Dave Brondsema - 2013-05-03
    • Milestone: forge-may-03 --> forge-may-17
     
  • Dave Brondsema

    Dave Brondsema - 2013-05-03
    • Size: --> 2
     
  • Dave Brondsema

    Dave Brondsema - 2013-05-03
    • Milestone: forge-may-17 --> forge-may-31
     
  • Dave Brondsema

    Dave Brondsema - 2013-05-31
    • Milestone: forge-may-31 --> forge-jun-14
     
  • Dave Brondsema

    Dave Brondsema - 2013-06-07
    • status: open --> blocked
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2013-06-07

    Alexandria has only 1 message with this id and only 1 thread with the thread id. Mongo, however, has the old forum_post record (from a failed migration) with _id:'3631830@import'. The app_config_id of that record is not present in the config collection, so the mechanisms at the beginning of migration to clear out old failed data won't work. Thus, siteops ticket to clear out those few forum posts. https://trac.sdot.me/trac/siteops/ticket/53856

     
  • Dave Brondsema

    Dave Brondsema - 2013-06-12
    • status: blocked --> validation
     
  • Dave Brondsema

    Dave Brondsema - 2013-06-14
    • Milestone: forge-jun-14 --> forge-jun-28
     
  • Dave Brondsema

    Dave Brondsema - 2013-06-18
    • status: validation --> closed
     

Log in to post a comment.