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: <roller-dev@incubator.apache.org>
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: <roller-user@incubator.apache.org>
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.


Reply via email to