Closed Bug 55293 Opened 24 years ago Closed 23 years ago

Pages in history don't expire after x days while mozilla is running

Categories

(Core Graveyard :: History: Global, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Future

People

(Reporter: gilles+mozilla, Assigned: bugzilla)

References

Details

Attachments

(1 file, 4 obsolete files)

Build Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001004. I have set the delay for pages to expire in history to 9 days. But it seems that nothing is done : I still have pages from 18/09 in history (last time I manually deleted the history file)
Global history issues. Over to rjc.
confirmed with 2000101608 builds. yes this is on the branch too. nominating for rtm although i kow it'll get minused. I need this on the radar as part of a larger history issue. cc: sairuh just so you know here's a pref that doesn't work.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: rtm
Robert, isn't this your bug?
Assignee: radha → rjc
my/claudius' guess is that this occurs on all platforms --but we need to doublecheck just to be sure...
OS: Windows NT → All
Hardware: PC → All
I can't see the PDT accepting this at this point :-(
Whiteboard: [rtm-]
Summary: Pages in history doesn't expires after x days → Pages in history don't expire after x days
*** Bug 61135 has been marked as a duplicate of this bug. ***
Mine!
Assignee: rjc → alecf
Keywords: rtm
Whiteboard: [rtm-]
Target Milestone: --- → mozilla0.9
Blocks: 61994
No longer blocks: 61994
Blocks: 61994
Alec, I have a fix for this, which I'll attach here.
*** Bug 61994 has been marked as a duplicate of this bug. ***
Attached patch proposed fix (obsolete) — Splinter Review
Attached patch proposed fix, part II (prefs) (obsolete) — Splinter Review
Alec, I'm handing these patches off to you, if you don't mind. I know you're doing other stuff in history, so you can merge this stuff in. Note that we need a default for the expiration limit, as far as I can tell. The proposed fix is less than ideal in a number of ways, so feel free to improve on it :-) Since we seem to do a commit of history whenever we close a window, we need to be careful not to do compress commits too often, since they are more expensive than incremental commits.
sr=alecf on that patch - thanks david I actually want to fix this in a slightly different way by adding timers, which would fire every hour or so, but I like your refactoring.. so when you check this in, leave this bug open, and I'll add timers.
Waterson, can I get an r= on this? Alec, if you expire based on timers, you should pass in true for the notification parameter (and test it, of course :-) I took the notification stuff from the clear history routine, so it should work fine, but I didn't try it )
Assignee: alecf → bienvenu
I'm attaching a slightly updated patch that observes the pref changing.
david: I took your patch and ran with it, so I'll take the bug back if I can get an r= from you :) waterson - if you can sr= my updated patch, that would rock.
Assignee: bienvenu → alecf
- Why do you need to store the file size as a member variable? Can't you just ask for it when you need it? (And if you _do_ need it as a member variable, I didn't see where you updated it...shouldn't you do that after a commit?) - You should #ifdef the ``mork doesn't compute shouldCompress right'' code so it can be easily removed later. - Could you share redundant code between ExpireEntries() and RemoveAllPages()? For example, make a RemoveIf() method that takes a predicate that tests whether or not the row should be nuked? - You should make nsGlobalHistory `support weak references' so that the observer service doesn't pin history.
r=bienvenu for your stuff, Alec, modulo Chris's comment about the observer service. I cache away the file size so I don't have to duplicate or factor out the code that gets an nsIFile for the global history db. Perhaps we could cache away the nsIFile in the global history, or factor out the code. Can you do that, Alec? But, N.B., if an when we remove the #ifdef code, we would remove the caching of the file size code too, since it would no longer be needed (i.e., it could be part of the #ifdef). We could share the common code between ExpireEntries() and RemoveAllPages(), though it would either involve factoring out some of the common code (the easiest thing to do), or adding a RemoveIf() predicate. Adding a RemoveIf predicate is probably more trouble than it's worth, IMO, whereas factoring out the common code could be used when we implement actual delete of selected history entries.
(oops, I wrote this & had a mid-air collision, so some of this matches up with what bienvenu just wrote) re: sharing more code between removeallpages/expireentries - I noticed this too, and will address that in my timer patch, which will come after this goes in re: weak refs - good call... I'll do that re: file size - it looks like we basically throw out the filename after startup.. at the moment, the compress only happens on shutdown though, so I think david's loose approximation is fine until I get timers in there. (The worst that can happen is a situation where your history starts out small, but then you do alot of surfing in one session, and the db won't be compressed until the next time you startup & shutdown the browser) I'd rather land this in stages instead of one giant landing.. Since we won't be marking this fixed yet, how does the patch plus the observer stuff? Patch forthcoming
r=bienvenu, and Alec's right about the loose approximation stuff - eventually, the ship will right itself.
sr=waterson
Status: NEW → ASSIGNED
thanks. the updated patch has been checked in. Next stop: more refactoring, and timers.
And it was backed out by cls 20:39: "Backing out alecf's changes that were causing a crash on startup on unix builds"
argh. dunno what went wrong.. investigating
On the basis of the 2000-12-11-21 build alone, nsGlobalHistory::ExpireEntries jumped to #2 on the talkback list for the past week. Stack trace: nsGlobalHistory::ExpireEntries [d:\builds\seamonkey\mozilla\xpfe\components\history\src\nsGlobalHistory.cpp line 1840] nsGlobalHistory::CloseDB [d:\builds\seamonkey\mozilla\xpfe\components\history\src\nsGlobalHistory.cpp line 1930] nsGlobalHistory::~nsGlobalHistory [d:\builds\seamonkey\mozilla\xpfe\components\history\src\nsGlobalHistory.cpp line 273] nsGlobalHistory::`scalar deleting destructor' nsGlobalHistory::Release [d:\builds\seamonkey\mozilla\xpfe\components\history\src\nsGlobalHistory.cpp line 306] nsGlobalHistoryConstructor [d:\builds\seamonkey\mozilla\xpfe\components\build\nsModule.cpp line 44] nsGenericFactory::CreateInstance [d:\builds\seamonkey\mozilla\xpcom\components\nsGenericFactory.cpp line 48] nsComponentManagerImpl::CreateInstance [d:\builds\seamonkey\mozilla\xpcom\components\nsComponentManager.cpp line 1202] nsComponentManager::CreateInstance [d:\builds\seamonkey\mozilla\xpcom\components\nsRepository.cpp line 82] nsServiceManagerImpl::GetService [d:\builds\seamonkey\mozilla\xpcom\components\nsServiceManager.cpp line 345] nsServiceManager::GetService [d:\builds\seamonkey\mozilla\xpcom\components\nsServiceManager.cpp line 560] nsGetServiceByCID::operator() [d:\builds\seamonkey\mozilla\xpcom\components\nsServiceManager.cpp line 46] nsCOMPtr_base::assign_from_helper [d:\builds\seamonkey\mozilla\xpcom\base\nsCOMPtr.cpp line 66] nsBrowserContentHandler::GetDefaultArgs [d:\builds\seamonkey\mozilla\xpfe\browser\src\nsBrowserInstance.cpp line 2312] LaunchApplication [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp line 362] startupPrefEnumerationFunction [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp line 491] nsPref::EnumerateChildren [d:\builds\seamonkey\mozilla\modules\libpref\src\nsPref.cpp line 1379] HandleArbitraryStartup [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp line 544] DoCommandLines [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp line 591] main1 [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp line 1002] main [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp line 1263] This is from n.p.m.crash-data. The internal talkback stuff probably has much more detail...
Alec and I have fixes for all the problems.
Priority: P3 → P2
Keywords: crash
Summary: Pages in history don't expire after x days → Pages in history don't expire after x days [nsGlobalHistory::ExpireEntries]
not a crash bug (it only was for about 8 hours), removing "crash" keyword and error location
Keywords: crash
Summary: Pages in history don't expire after x days [nsGlobalHistory::ExpireEntries] → Pages in history don't expire after x days
nav triage team: not a beta stopper.
Keywords: nsbeta1-
Vishy, please note that bug 61994 is a dup of this one. Please read the other bug to evaluate the severity of this one.
Keywords: mozilla0.9
a slight clarification here, for those listening: pages now expire after X days, but they only do it on shutdown.. the basic functionality is there.. so the bit about using timers, which I still have to fix, is not a beta stopper..
Oh, OK, sorry.
Keywords: mozilla0.9
This should not be targetted on mozilla 0.9 if Netscape has determined that alecf will not be working on it between now and nsbeta1. Netscape nav triage team, please set TM to "---" or "Future" when you nsbeta1- a bug. Thanks.
Somebody already fixed this bug.
no, this bug is not completely fixed. we need to periodically expire pages while the browser is up. Read above comments, re: timers.
Component: History: Session → History: Global
Target Milestone: mozilla0.9 → mozilla1.0
Changing summary to "Pages in history don't expire after x days while mozilla is running" to better reflect current state of bug. Resetting target milestone.
Summary: Pages in history don't expire after x days → Pages in history don't expire after x days while mozilla is running
Target Milestone: mozilla1.0 → ---
to the Future... and beyond!
Target Milestone: --- → Future
*** Bug 78915 has been marked as a duplicate of this bug. ***
This old bug is still alive and kicking in 0.9.2. I use RedHat linux 7.1 on a PC.
argh.. take two at reassigning history bugs to new owner
Assignee: alecf → blakeross
Status: ASSIGNED → NEW
Target Milestone: Future → ---
*** Bug 95616 has been marked as a duplicate of this bug. ***
I think there may be two different bugs here. One of them seems to been fixed in 0.9.5. Bug 1. The bug as originally described: "I have set the delay for pages to expire in history to 9 days. But it seems that nothing is done" Bug 2. The bug described by the current summery: "Pages in history don't expire after x days while mozilla is running" I have had the first form of the bug: nothing ever expires. If I Go to Edit /Preferences / Navigator / History and set "Remember visited pages for the first ___ days" as 1. Visit an url, causing its color to change. Wait two days. The url still has the visited color. In 0.9.5 _this_ bug is gone.
Status: NEW → ASSIGNED
Priority: P2 → --
Target Milestone: --- → Future
Attached patch patchSplinter Review
Attachment #20443 - Attachment is obsolete: true
Attachment #20444 - Attachment is obsolete: true
Attachment #20479 - Attachment is obsolete: true
Attachment #20487 - Attachment is obsolete: true
alec, I think this is just that same bug again. can you sr?
Comment on attachment 69333 [details] [diff] [review] patch sr=alecf
Attachment #69333 - Flags: superreview+
fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: