[mythtv-commits] Ticket #2194: Patch to randomise mythfilldatabase times
MythTV
mythtv at cvs.mythtv.org
Fri Sep 15 04:55:30 UTC 2006
#2194: Patch to randomise mythfilldatabase times
------------------------------------------------+---------------------------
Reporter: willu.mailingLists at cse.unsw.edu.au | Owner: cpinkham
Type: enhancement | Status: new
Priority: minor | Milestone: 0.21
Component: mythtv | Version: head
Severity: medium | Resolution:
------------------------------------------------+---------------------------
Comment (by cpinkham):
Doesn't this patch have the adverse side effect that jobs we want to run
once a day could potentially run every 12 hours because of the following
line:
longEnough = ((period * oneday) - oneday/2);
That alone would be a bad thing, but is probably prevented by what appears
to be flawed logic in the random time check:
((random()%((maxhour-minhour+1)*6)) == 0)
So if maxhour is 24 and minhour is 0, then you're checking if the random
number is evenly divisible by (24 - 0 + 1) * 6 which works out to 150.
Those would seem to be very very low odds which would mean we'd always be
running in the last half hour of our window when the "(hour == maxhour &&
minute > 30)" check kicked in. Doesn't seem very randomized.
Can you check the logs to see when your mythfilldatabase runs were
actually occuring to show this is really random and not semi-random, but
mostly in the last 30 minutes of the window?
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/2194#comment:2>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list