Hi, You might consider the following to get this solved : (We solved the problem with our infrastructur in the following way)
-Instead (or in addition to the ID key) use the servers IP-Address. -The server which first aquires the handle locks the whole task until its tomcat engine shuts down. -On startup or shutdown of the Tomcat engine release all aquired handles (using servers IP address). -Add parameters to roller.properties to specify allowed IP adresses to run background jobs ! This way you have full external control of whats going on (you always can tell which server is running the jobs and which logfile to look at. In addition we do not want any jobs running on the staging server. Further on server crash you have a cleaned up table after the server restarts. Feel free to ask further questions about our setup. Thomas Anil Gangolli wrote: > > > Reviewing the lock code, I believe there are some potential race > conditions. > > In addition to the name uniqueness, one needs a generation number/version > to > avoid multiple threads/processes updating the same row and thinking that > they own the lock. > > --a. > > > ----- Original Message ----- > From: "Anil Gangolli" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Friday, December 01, 2006 8:03 AM > Subject: Fw: 3.1 RC1 - Taskmanagement - ResetHitcoutTask > > >> >> >> Shouldn't there be some uniqueness constraint on the NAME column >> preventing a lease from being acquired twice? >> >> ----- Original Message ----- >> From: "Thomas-W Hofmann" <[EMAIL PROTECTED]> >> To: <[email protected]> >> Sent: Friday, December 01, 2006 6:46 AM >> Subject: 3.1 RC1 - Taskmanagement - ResetHitcoutTask >> >> >>> ResetHitCountsTask is shown twice and does not run nor go away after >>> restart ? >>> >>> ID NAME ISLOCKED >>> TIMEACQUIRED TIMELEASED LASTRUN >>> -------------------------------- -------------------- ----------- >>> ----------------------- ------------- ----------------------- >>> 8a0cb4910f0b83dd010f0b8415490001 PingQueueTask 0 2006-12-01 >>> 14:40:41.825 30 2006-12-01 14:40:41.825 >>> 8a0cbbc00f0b8b8c010f0cf638350019 ResetHitCountsTask 0 2006-11-22 >>> 00:00:00.053 30 2006-11-22 00:00:00.053 >>> 8a0cbbc80f2f32e6010f2f3b79690003 SyncWebsitesTask 0 2006-12-01 >>> 12:00:00.047 30 2006-12-01 12:00:00.047 >>> 8a0cbbc80f0b8b9c010f0cf6382e0001 ResetHitCountsTask 1 2006-11-22 >>> 00:00:00.046 30 2006-11-22 00:00:00.046 >>> 8a0cbbc80f2f32e6010f2f3c42ee0004 RefreshEntriesTask 0 2006-12-01 >>> 13:00:00.057 30 2006-12-01 13:00:00.057 >>> 8a0cb4910f0b8b72010f0cf638100003 TurnoverReferersTask 0 2006-11-30 >>> 00:00:00.038 30 2006-11-30 00:00:00.038 >>> >>> Any ideas ? >>> Thomas >>> >>> >>> >>> >>> -- >>> >>> Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte >>> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese >>> E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den >>> Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie >>> die >>> unbefugte Weitergabe dieser Mail ist nicht gestattet. >>> >>> This e-mail may contain confidential and/or privileged information. If >>> you are not the intended recipient (or have received this e-mail in >>> error) please notify the sender immediately and destroy this e-mail. Any >>> unauthorized copying, disclosure or distribution of the material in this >>> e-mail is strictly forbidden. >> > > > -- View this message in context: http://www.nabble.com/Fw%3A-3.1-RC1---Taskmanagement---ResetHitcoutTask-tf2738764s12275.html#a7675774 Sent from the Roller - Dev mailing list archive at Nabble.com.
