You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@allura.apache.org by Dave Brondsema <br...@users.sf.net> on 2014/08/29 19:55:50 UTC

[allura:tickets] #7647 Script to clean up, or code to handle, Dupe Key errors on wiki page_history [ss8446]



---

** [tickets:#7647] Script to clean up, or code to handle, Dupe Key errors on wiki page_history [ss8446]**

**Status:** open
**Milestone:** forge-sep-19
**Labels:** support 
**Created:** Fri Aug 29, 2014 05:55 PM UTC by Dave Brondsema
**Last Updated:** Fri Aug 29, 2014 05:55 PM UTC
**Owner:** nobody

Users get errors like the following from time to time when trying to save a wiki page.  I think it may also occur occasionally for tickets.  We should be able to clean this up easily, or better yet update the site code to handle the error automatically and continue.

~~~~
File '/var/local/env-allura/lib/python2.7/site-packages/Ming-0.4.7-py2.7.egg/ming/session.py', line 162 in insert
  bson = self._impl(doc).insert(data, safe=kwargs.get('safe', True))
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 117 in wrapper
  return self.run_and_log(func, inst, *args, **kwargs)
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 126 in run_and_log
  return func(*args, **kwargs)
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.page_history.$artifact_class_1_artifact_id_1_version_1
dup key: { : "forgewiki.model.wiki.Page", : ObjectId(\\'53bd2ee190954717fae54832\\'), : 51 }', 'doc:
{\\'import_id\\': None, \\'app_config_id\\': ObjectId(\\'538661d5c4d1041477a0e495\\'), \\'artifact_id\\': ObjectId(\\'53bd2ee190954717fae54832\\'),
    \\'author\\': {\\'username\\': u\\'kenlunde\\', \\'display_name\\': u\\'Dr. Ken Lunde\\', \\'id\\': ObjectId(\\'4cc585dcb9363c527a0000bf\\'),
    \\'logged_ip\\': \\'X.X.X.X\\'}, \\'deleted\\': False, \\'timestamp\\': datetime.datetime(2014, 8, 29, 15, 47, 3, 985000),
    \\'labels\\': [], \\'artifact_class\\': \\'forgewiki.model.wiki.Page\\', \\'acl\\': [], \\'version\\': 51,
    \\'mod_date\\': datetime.datetime(2014, 8, 29, 15, 47, 3, 987628), \\'_id\\': ObjectId(\\'5400a077485acd3627d716fe\\'),
    \\'data\\': {\\'import_id\\': None, \\'app_config_id\\': ObjectId(\\'538661d5c4d1041477a0e495\\'),
        \\'title\\': u\\'Release Notes\\', \\'deleted\\': False,
        \\'text\\': u\\'Test\\\\r\\\\n\\\\r\\\\n# Overview\\\\r\\\\n*Source Han Sans* is a set of OpenType/CFF Pan-CJK f.....
~~~~


---

Sent from sourceforge.net because dev@allura.apache.org is subscribed to https://sourceforge.net/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

[allura:tickets] #7647 Script to clean up, or code to handle, Dupe Key errors on wiki page_history [ss8446]

Posted by Dave Brondsema <br...@users.sf.net>.
- **status**: code-review --> closed
- **QA**: Dave Brondsema



---

** [tickets:#7647] Script to clean up, or code to handle, Dupe Key errors on wiki page_history [ss8446]**

**Status:** closed
**Milestone:** forge-oct-31
**Labels:** support 42cc 
**Created:** Fri Aug 29, 2014 05:55 PM UTC by Dave Brondsema
**Last Updated:** Tue Oct 21, 2014 04:10 PM UTC
**Owner:** Igor Bondarenko

Users get errors like the following from time to time when trying to save a wiki page.  I think it may also occur occasionally for tickets.  We should be able to clean this up easily, or better yet update the site code to handle the error automatically and continue.

~~~~
File '/var/local/env-allura/lib/python2.7/site-packages/Ming-0.4.7-py2.7.egg/ming/session.py', line 162 in insert
  bson = self._impl(doc).insert(data, safe=kwargs.get('safe', True))
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 117 in wrapper
  return self.run_and_log(func, inst, *args, **kwargs)
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 126 in run_and_log
  return func(*args, **kwargs)
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.page_history.$artifact_class_1_artifact_id_1_version_1
dup key: { : "forgewiki.model.wiki.Page", : ObjectId(\\'53bd2ee190954717fae54832\\'), : 51 }', 'doc:
{\\'import_id\\': None, \\'app_config_id\\': ObjectId(\\'538661d5c4d1041477a0e495\\'), \\'artifact_id\\': ObjectId(\\'53bd2ee190954717fae54832\\'),
    \\'author\\': {\\'username\\': u\\'kenlunde\\', \\'display_name\\': u\\'Dr. Ken Lunde\\', \\'id\\': ObjectId(\\'4cc585dcb9363c527a0000bf\\'),
    \\'logged_ip\\': \\'X.X.X.X\\'}, \\'deleted\\': False, \\'timestamp\\': datetime.datetime(2014, 8, 29, 15, 47, 3, 985000),
    \\'labels\\': [], \\'artifact_class\\': \\'forgewiki.model.wiki.Page\\', \\'acl\\': [], \\'version\\': 51,
    \\'mod_date\\': datetime.datetime(2014, 8, 29, 15, 47, 3, 987628), \\'_id\\': ObjectId(\\'5400a077485acd3627d716fe\\'),
    \\'data\\': {\\'import_id\\': None, \\'app_config_id\\': ObjectId(\\'538661d5c4d1041477a0e495\\'),
        \\'title\\': u\\'Release Notes\\', \\'deleted\\': False,
        \\'text\\': u\\'Test\\\\r\\\\n\\\\r\\\\n# Overview\\\\r\\\\n*Source Han Sans* is a set of OpenType/CFF Pan-CJK f.....
~~~~


---

Sent from sourceforge.net because dev@allura.apache.org is subscribed to https://sourceforge.net/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

[allura:tickets] #7647 Script to clean up, or code to handle, Dupe Key errors on wiki page_history [ss8446]

Posted by Igor Bondarenko <je...@users.sf.net>.
- **status**: in-progress --> code-review
- **Comment**:

Closed #669. `je/7647`

I didn't manage to reproduce this by hand, but made a test.

You can test it like this:

- `git checkout HEAD~2` while on the branch
- `cd ForgeWiki`
- `nosetests forgewiki.tests.test_models:TestPageSnapshots._test_version_race`
- make sure it fails and raises dup key errors.
- `git checkout je/7647`
- run test again `nosetests forgewiki.tests.test_models:TestPageSnapshots.test_version_race` (note it's renamed)
- make sure it passes and doesn't raise anything



---

** [tickets:#7647] Script to clean up, or code to handle, Dupe Key errors on wiki page_history [ss8446]**

**Status:** code-review
**Milestone:** forge-oct-17
**Labels:** support 42cc 
**Created:** Fri Aug 29, 2014 05:55 PM UTC by Dave Brondsema
**Last Updated:** Fri Oct 17, 2014 02:58 PM UTC
**Owner:** Igor Bondarenko

Users get errors like the following from time to time when trying to save a wiki page.  I think it may also occur occasionally for tickets.  We should be able to clean this up easily, or better yet update the site code to handle the error automatically and continue.

~~~~
File '/var/local/env-allura/lib/python2.7/site-packages/Ming-0.4.7-py2.7.egg/ming/session.py', line 162 in insert
  bson = self._impl(doc).insert(data, safe=kwargs.get('safe', True))
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 117 in wrapper
  return self.run_and_log(func, inst, *args, **kwargs)
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 126 in run_and_log
  return func(*args, **kwargs)
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.page_history.$artifact_class_1_artifact_id_1_version_1
dup key: { : "forgewiki.model.wiki.Page", : ObjectId(\\'53bd2ee190954717fae54832\\'), : 51 }', 'doc:
{\\'import_id\\': None, \\'app_config_id\\': ObjectId(\\'538661d5c4d1041477a0e495\\'), \\'artifact_id\\': ObjectId(\\'53bd2ee190954717fae54832\\'),
    \\'author\\': {\\'username\\': u\\'kenlunde\\', \\'display_name\\': u\\'Dr. Ken Lunde\\', \\'id\\': ObjectId(\\'4cc585dcb9363c527a0000bf\\'),
    \\'logged_ip\\': \\'X.X.X.X\\'}, \\'deleted\\': False, \\'timestamp\\': datetime.datetime(2014, 8, 29, 15, 47, 3, 985000),
    \\'labels\\': [], \\'artifact_class\\': \\'forgewiki.model.wiki.Page\\', \\'acl\\': [], \\'version\\': 51,
    \\'mod_date\\': datetime.datetime(2014, 8, 29, 15, 47, 3, 987628), \\'_id\\': ObjectId(\\'5400a077485acd3627d716fe\\'),
    \\'data\\': {\\'import_id\\': None, \\'app_config_id\\': ObjectId(\\'538661d5c4d1041477a0e495\\'),
        \\'title\\': u\\'Release Notes\\', \\'deleted\\': False,
        \\'text\\': u\\'Test\\\\r\\\\n\\\\r\\\\n# Overview\\\\r\\\\n*Source Han Sans* is a set of OpenType/CFF Pan-CJK f.....
~~~~


---

Sent from sourceforge.net because dev@allura.apache.org is subscribed to https://sourceforge.net/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

[allura:tickets] #7647 Script to clean up, or code to handle, Dupe Key errors on wiki page_history [ss8446]

Posted by Dave Brondsema <br...@users.sf.net>.
- **Size**:  --> 2



---

** [tickets:#7647] Script to clean up, or code to handle, Dupe Key errors on wiki page_history [ss8446]**

**Status:** open
**Milestone:** forge-sep-19
**Labels:** support 
**Created:** Fri Aug 29, 2014 05:55 PM UTC by Dave Brondsema
**Last Updated:** Mon Sep 08, 2014 04:07 PM UTC
**Owner:** nobody

Users get errors like the following from time to time when trying to save a wiki page.  I think it may also occur occasionally for tickets.  We should be able to clean this up easily, or better yet update the site code to handle the error automatically and continue.

~~~~
File '/var/local/env-allura/lib/python2.7/site-packages/Ming-0.4.7-py2.7.egg/ming/session.py', line 162 in insert
  bson = self._impl(doc).insert(data, safe=kwargs.get('safe', True))
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 117 in wrapper
  return self.run_and_log(func, inst, *args, **kwargs)
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 126 in run_and_log
  return func(*args, **kwargs)
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.page_history.$artifact_class_1_artifact_id_1_version_1
dup key: { : "forgewiki.model.wiki.Page", : ObjectId(\\'53bd2ee190954717fae54832\\'), : 51 }', 'doc:
{\\'import_id\\': None, \\'app_config_id\\': ObjectId(\\'538661d5c4d1041477a0e495\\'), \\'artifact_id\\': ObjectId(\\'53bd2ee190954717fae54832\\'),
    \\'author\\': {\\'username\\': u\\'kenlunde\\', \\'display_name\\': u\\'Dr. Ken Lunde\\', \\'id\\': ObjectId(\\'4cc585dcb9363c527a0000bf\\'),
    \\'logged_ip\\': \\'X.X.X.X\\'}, \\'deleted\\': False, \\'timestamp\\': datetime.datetime(2014, 8, 29, 15, 47, 3, 985000),
    \\'labels\\': [], \\'artifact_class\\': \\'forgewiki.model.wiki.Page\\', \\'acl\\': [], \\'version\\': 51,
    \\'mod_date\\': datetime.datetime(2014, 8, 29, 15, 47, 3, 987628), \\'_id\\': ObjectId(\\'5400a077485acd3627d716fe\\'),
    \\'data\\': {\\'import_id\\': None, \\'app_config_id\\': ObjectId(\\'538661d5c4d1041477a0e495\\'),
        \\'title\\': u\\'Release Notes\\', \\'deleted\\': False,
        \\'text\\': u\\'Test\\\\r\\\\n\\\\r\\\\n# Overview\\\\r\\\\n*Source Han Sans* is a set of OpenType/CFF Pan-CJK f.....
~~~~


---

Sent from sourceforge.net because dev@allura.apache.org is subscribed to https://sourceforge.net/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.