Closed Bug 602085 Opened 14 years ago Closed 14 years ago

idle-daily has become idle-session and is waiting for an idle time of more than 3 days

Categories

(Core :: Widget, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b7
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: mak, Assigned: mak)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

The patch in bug 544240 forgot to set back PREF_LAST_DAILY, the result is that idle.lastDailyNotification is updated last at April, and idle-daily is not served anymore once a day, but once a session.

MikeK suggested to also handle the case where the pref is wrongly set in future (due to user changing system time), that should be easy to do, so I'll do it.
Asking blocking because idle-daily is used for heavy tasks or other stuff that is better not run per session.
blocking2.0: --- → ?
blocking2.0: ? → betaN+
this nice code

me->mIdleService->AddIdleObserver(me, MAX_IDLE_POLL_INTERVAL*1000);

is making idle-daily (currently session) wait for an idle of 300 000 seconds since the second param of AddIdleObserver is seconds, not milliseconds :(

this could explain a bunch of stuff, broken frecency, databases not vacuumed, database page_size not changing...
Summary: idle-daily has become idle-session → idle-daily has become idle-session and is waiting for an idle time of more than 3 days
Attached patch patch v1.0 (obsolete) — Splinter Review
Asking r to Shawn since he already reviewed idle code in the past.

I suggest (And I'll do) to file a bug to find a way to test idle, I have no idea how we could do it, but maybe someone has ideas and we could collect them there.
Attachment #481224 - Flags: review?(sdwilsh)
I'd suggest to re-evaluate blocking of this bug for beta7, due to latest discovery about the fact idle-daily stuff never runs in current betas.
While it's true that we don't do what we say we do, the API itself isn't broken, so I think it's OK.  It does, however, mean we aren't doing things we thought we were, which is sad, but I think we can live with until this is [likely] fixed in beta 8.
Comment on attachment 481224 [details] [diff] [review]
patch v1.0

>+  // Check time of the last idle-daily notification.  If it was less than 24
>+  // hours ago listen for idle, otherwise set a timer for 24 hours from now.
This comment says the opposite of what the code does.  The good news is that the code is correct.

>+  bool mObservesIdle;
Add a comment about this like we do for other members please.

r=sdwilsh
Attachment #481224 - Flags: review?(sdwilsh) → review+
See also, bug 564118.
Attached patch patch v1.1Splinter Review
Addressed comments.

I'm going through tryserver before pushing because I want to check what effect could have re-enabling idle-daily on tests and talos. Any effect could not be considered a regression, but it is better being prepared.
Attachment #481224 - Attachment is obsolete: true
good news, tryserver tells me this can land.
http://hg.mozilla.org/mozilla-central/rev/446f80f30026
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
re-enabling idle-daily was causing oranges on some frecency bug on osx and windows (tinderboxes are permanently idle, so this is not a surprise). we do frecency recalculation on idle-daily but I did not notice this on tryserver because I also had another unelated patch that was making those tests more robust.
To fix this I've pushed a followup that temporarily disables the history idle-daily observer, so that the only frecency changes are those activated by the tests.
http://hg.mozilla.org/mozilla-central/rev/97949d240701
Target Milestone: mozilla2.0b8 → mozilla2.0b7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: