2648: Incorrect diff displayed (different file than the one in db, maybe wrong cache?)

con****@mesimi****** (Google Code) (Is this you? Claim this profile.)
June 25, 2012
What version are you running?
1.6.9, just upgraded from 1.6.5., Debian, python 2.6.6 virtualenv

What's the URL of the page containing the problem?
Diff of a review request - /r/582/diff/#index_header

What steps will reproduce the problem?
1.
bin/pip install -U ReviewBoard # had 1.6.5, got 1.6.9
2.
bin/rb-site upgrade /path/to/rbwwwinstance
3.
upload a diff in an SVN

The first file in the diff set is a different one; diff is for HEAD I think (latest commit).
The displayed file is CHANGELOG.rst, while the uploaded diff file contained NySite.py. The DB contains the correct file with the correct diff, only the diff content is incorrect.

Diffset is 1092, contained in diff history 918, which is contained in review request 582, so foreign keys are all correct



It is very easy to understand from screenshot.

Could be something related to caching? Because we used it for 2 days after upgrading it, when I uploaded the diff which is shown erronously and after this issue occurred, I reran the upgrade from backup, and this happened again.

How can I reset cache?
Cache backend is set to file:///var/local/reviewboard/www/reviewboard/tmp/reviewboard_cache but it does not exist:
# ls -la /var/local/reviewboard/www/reviewboard/tmp/reviewboard_cache
ls: cannot access /var/local/reviewboard/www/reviewboard/tmp/reviewboard_cache: No such file or directory
#1 con****@mesimi****** (Google Code) (Is this you? Claim this profile.)
I want to invalidate this issue.
The cache was created in /tmp/

After deleting it all came back to normal!
One thing still: I remembered I deleted a diff file from db, manually, through Django Admin. Maybe we should also invalidate cache by a post-delete signal.
david
#2 david
  • +SetupIssue