Closed
Bug 569310
Opened 15 years ago
Closed 15 years ago
[k] Entire forum deleted accidentally (related to DoesNotExist: Post matching query does not exist assertion?)
Categories
(support.mozilla.org :: Forum, task)
support.mozilla.org
Forum
Tracking
(Not tracked)
VERIFIED
FIXED
2.1
People
(Reporter: stephend, Assigned: rrosario)
References
()
Details
(Keywords: dataloss)
Finally, I have a screencast capture of the "delete sometimes deletes entire forums (!)" bug.
Sadly, I don't have concise STR, but we'll have to work backwards from it.
It goes without saying that bug 568636 would help here, too.
SCREENCAST: http://screencast.com/t/ZDhiNWQzNDUt
Traceback (most recent call last):
File "/data/virtualenvs/kitsune/src/django/django/core/handlers/base.py", line 101, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/data/virtualenvs/kitsune/src/django/django/contrib/auth/decorators.py", line 24, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/data/virtualenvs/kitsune/src/django-authority/authority/decorators.py", line 54, in decorated
return view_func(request, *args, **kwargs)
File "/data/www/support-stage-new.mozilla.com/kitsune/apps/forums/views.py", line 245, in delete_post
post.delete()
File "/data/www/support-stage-new.mozilla.com/kitsune/apps/forums/models.py", line 128, in delete
if forum.last_post and forum.last_post.id == self.id:
File "/data/virtualenvs/kitsune/src/django/django/db/models/fields/related.py", line 276, in __get__
rel_obj = rel_mgr.using(db).get(**params)
File "/data/virtualenvs/kitsune/src/django/django/db/models/query.py", line 339, in get
% self.model._meta.object_name)
DoesNotExist: Post matching query does not exist.
Semi-STR:
1. Create a bunch of posts (I think having more than one pages is necessary)
2. Reply to a couple posts
3. Delete, delete, delete (start with the posts above the replies, and if that doesn't work, try the replies themselves)
Again, random, so hard to reproduce. But I've done this twice now, which is indeed scary.
The following assertion seems to be relevant; our count might be going off into the weeds:
Traceback (most recent call last):
File "/data/virtualenvs/kitsune/src/django/django/core/handlers/base.py", line 101, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/data/virtualenvs/kitsune/src/django/django/contrib/auth/decorators.py", line 24, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/data/virtualenvs/kitsune/src/django-authority/authority/decorators.py", line 54, in decorated
return view_func(request, *args, **kwargs)
File "/data/www/support-stage-new.mozilla.com/kitsune/apps/forums/views.py", line 245, in delete_post
post.delete()
File "/data/www/support-stage-new.mozilla.com/kitsune/apps/forums/models.py", line 128, in delete
if forum.last_post and forum.last_post.id == self.id:
File "/data/virtualenvs/kitsune/src/django/django/db/models/fields/related.py", line 276, in __get__
rel_obj = rel_mgr.using(db).get(**params)
File "/data/virtualenvs/kitsune/src/django/django/db/models/query.py", line 339, in get
% self.model._meta.object_name)
DoesNotExist: Post matching query does not exist.
Reporter | ||
Updated•15 years ago
|
Summary: Entire forum deleted accidentally (related to DoesNotExist: Post matching query does not exist assertion?) → [k] Entire forum deleted accidentally (related to DoesNotExist: Post matching query does not exist assertion?)
Reporter | ||
Comment 1•15 years ago
|
||
Eh, sorry about the epic double-paste, there. C&P FTL sometimes, especially when it's below-the-fold.
Comment 2•15 years ago
|
||
We do log deletions: we just need to double check to see where they're going.
Assignee | ||
Comment 3•15 years ago
|
||
STR:
1) Go to the last post of the forum
2) Add a new reply
3) Delete the second to last post (what used to be the last post)
BAM!
Looks like a caching issue.
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → rrosario
Comment 4•15 years ago
|
||
Step 0: flush cache to start with a clean slate.
Assignee | ||
Comment 5•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•15 years ago
|
Flags: in-testsuite?
Flags: in-litmus?
Reporter | ||
Comment 6•15 years ago
|
||
Verified FIXED; I'll write a Litmus test for this later, and I'm roping in Tanay to write an automated one in Selenium/Python :-)
Status: RESOLVED → VERIFIED
Comment 7•15 years ago
|
||
Selenium python test script is up (called forum_deletion), see bug 569655
Flags: in-testsuite? → in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•