Closed
Bug 265188
Opened 20 years ago
Closed 20 years ago
GenerateVersionTable should only overwrite versioncache if it's changed
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.22
People
(Reporter: justdave, Assigned: LpSolit)
Details
Attachments
(1 file)
2.18 KB,
patch
|
glob
:
review+
justdave
:
review+
|
Details | Diff | Splinter Review |
To aide browser caching, we should compare the newly-generated temp versioncache
file with the previous version if one exists, and if they match, delete the temp
version instead of moving it overtop of the original. This leaves the inode and
last-modified stamp of the versioncache file alone, which allows apache to not
tell browsers that the file has changed.
Reporter | ||
Comment 1•20 years ago
|
||
Reassigning bugs that I'm not actively working on to the default component owner
in order to try to make some sanity out of my personal buglist. This doesn't
mean the bug isn't being dealt with, just that I'm not the one doing it. If you
are dealing with this bug, please assign it to yourself.
Assignee: justdave → general
QA Contact: mattyt-bugzilla → default-qa
![]() |
Assignee | |
Comment 2•20 years ago
|
||
this patch is only half tested, so please test it too before reviewing it.
![]() |
Assignee | |
Comment 3•20 years ago
|
||
checksetup.pl and doeditparams.cgi remove versioncache in all cases, which
sounds safe and good to me. Updating a product using editproducts.cgi does it
too, which may be useless if the product hasn't been changed, but this file is
such a mess (for example, some validations occur *after* the DB has been
updated) that I prefer to let him remove it in all cases for now.
So my patch fixes editclassifications.cgi only which is the single file (except
editproducts.cgi) to remove versioncache in all cases.
Note that my patch also removes the "update versioncache every hour" which is
useless as we already know that versioncache wouldn't be altered.
Target Milestone: --- → Bugzilla 2.22
Comment on attachment 188944 [details] [diff] [review]
patch, v1
r=glob
i'm 100% not sure that removing the CleanTokenTable is a good idea but it
doesn't belong in GenerateVersionTable, and that interval is an overkill.
Attachment #188944 -
Flags: review?(bugzilla) → review+
![]() |
Assignee | |
Updated•20 years ago
|
Flags: approval?
Reporter | ||
Comment 5•20 years ago
|
||
Comment on attachment 188944 [details] [diff] [review]
patch, v1
Something about this is eating at my conscience for some reason.... I want to
poke at this some myself before I approve it...
Attachment #188944 -
Flags: review?(justdave)
Comment 6•20 years ago
|
||
Comment on attachment 188944 [details] [diff] [review]
patch, v1
Yeah, you definitely can't remove CleanTokenTable. That's quite important. :-)
Attachment #188944 -
Flags: review-
![]() |
Assignee | |
Comment 7•20 years ago
|
||
(In reply to comment #6)
> (From update of attachment 188944 [details] [diff] [review] [edit])
> Yeah, you definitely can't remove CleanTokenTable. That's quite important. :-)
>
mkanat, could you please ask me or think a bit more why I removed
CleanTokenTable before denying review? I would really appreciate.
(23:33:01) LpSolit: myk: bug 23067 is the bug which added CleanTokenTable into
globals.pl
(23:37:26) LpSolit: myk: see justdave's comment:
https://bugzilla.mozilla.org/show_bug.cgi?id=23067#c22
(23:37:56) LpSolit: address would get different token numbers, to prevent them
from being able to easily masquerade as the opposite address when clicking the
link. They would obviously be tied by the userID in the token records.
Instead of installing Yet Another Cron Job to check when the end of the 72
hours has ocurred, the check could be hacked to run any time the versioncache
file is updated (which ocurrs once and hour or once per Bugzilla access,
whichever is longer).
(23:39:06) myk: right
(23:41:17) myk: LpSolit: given that, it seems like it would be sufficient to
clean the token table every time someone runs token.cgi
(23:41:43) myk: LpSolit: in fact, it seems like it makes sense to clean the
tokens table only every once in a while
(23:44:15) justdave: it might be worth pointing out that we had to move the
cleaning of the logincookies table out to a cron job on bmo
(23:45:04) justdave: it normally runs every time someone logs in, and it made
logins really slow here
(23:45:40) myk: right; and it doesn't need to be run that often
mkanat, I ask you to reconsider your review, but this time not based on your
feeling that "it may perhaps eventually be bad to remove CleanTokenTable from
globals.pl". Thanks!
Comment 8•20 years ago
|
||
OK. If you want to remove CleanTokenTable, though, I think we could do it in
another bug.
At the least, your patch has to put CleanTokenTable *somewhere*.
![]() |
Assignee | |
Comment 9•20 years ago
|
||
(In reply to comment #8)
> At the least, your patch has to put CleanTokenTable *somewhere*.
It's already somewhere:
token.cgi, line 77: Bugzilla::Token::CleanTokenTable();
Comment 10•20 years ago
|
||
Comment on attachment 188944 [details] [diff] [review]
patch, v1
OK, then. All clear. I'll let justdave take a look at it, too.
Attachment #188944 -
Flags: review-
Reporter | ||
Comment 11•20 years ago
|
||
Comment on attachment 188944 [details] [diff] [review]
patch, v1
ok, my curiosity is satisfied. I figured out what was eating at my brain :) I
was wondering if versioncache stored anything outside of the normal field value
stuff that you could edit, and thus might have stuff in it that didn't get an
unlink when it changed, but everything stored in versioncache is created by one
of the edit* utilities, and they all do the unlink (except for
editclassifications, which you're fixing with this patch).
We should really get rid of all these unlinks and make a
Bugzilla->invalidate_cache() routine (just in case the storage or invalidation
method changes), but that's another bug. :)
Attachment #188944 -
Flags: review?(justdave) → review+
Reporter | ||
Updated•20 years ago
|
Flags: approval? → approval+
![]() |
Assignee | |
Comment 12•20 years ago
|
||
Checking in editclassifications.cgi;
/cvsroot/mozilla/webtools/bugzilla/editclassifications.cgi,v <--
editclassifications.cgi
new revision: 1.13; previous revision: 1.12
done
Checking in globals.pl;
/cvsroot/mozilla/webtools/bugzilla/globals.pl,v <-- globals.pl
new revision: 1.330; previous revision: 1.329
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•