Do you know where your variables are? | |
PerlMonks |
Re^8: avoiding a race (roll over)by tye (Sage) |
on Sep 29, 2010 at 21:41 UTC ( [id://862715]=note: print w/replies, xml ) | Need Help?? |
Ah. A tiny change to the original specification leads to "notify of errors but never more than once per hour for the same error", which is something I've seen done many times and is an obvious enhancement for a notification system and how I interpreted it. Not notifying at all unless an error repeats after at least an hour is a strange specification but that is the original proposal as written. That also leaves an open question of what the window (if any) is for when you can purge ancient error messages (which is surely not just sensible but required for the system to not eventually just fall over). As written, the spec is also broken because (unless you add to it), once an hour has passed you get an e-mail for every single repeat of the same error (which is clearly not what is desired based on the justification given). And that still leaves a race with multiple e-mails, just a slightly different one. If X and Y both find 'file1' with a timestamp of more than 1 hour ago, then they will both e-mail about the same error at the same time. If you remove the race, then only the one that manages to update the timestamp of 'file1' would send the e-mail (for the next hour). And, no, I'm not convinced that my misreading of the original spec isn't actually what is really desired. (The original spec, as written, is clearly not what is really desired.) - tye
In Section
Seekers of Perl Wisdom
|
|