Robert Burrell Donkin (JIRA) ha scritto:
>     [ 
> https://issues.apache.org/jira/browse/JAMES-802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518927
>  ] 
> 
> Robert Burrell Donkin commented on JAMES-802:
> ---------------------------------------------
> 
> If we opt for read-write locking then the design of the locking needs to be 
> considered. The illustrative patch does not time out threads. Is timing out a 
> better idea?

What is the current behavior of your patch when an operation find the
resource locked? (early fail or does it wait to acquire the lock?)

Stefano

>> [torque] Mailbox Currency
>> -------------------------
>>
>>                 Key: JAMES-802
>>                 URL: https://issues.apache.org/jira/browse/JAMES-802
>>             Project: James
>>          Issue Type: Bug
>>          Components: IMAPServer
>>         Environment: torque -> derby
>>            Reporter: Robert Burrell Donkin
>>         Attachments: torque-locking.patch
>>
>>
>> Whilst running fetchmail->SIEVE->IMAP concurrently with an IMAP client, the 
>> following exception  frequently occurred:
>> org.apache.torque.TorqueException: java.sql.SQLTransactionRollbackException: 
>> A lock could not be obtained due to a deadlock
>> My diagnosis is that the torque mailbox cannot read and write concurrently. 
>> I've been running for a few weeks with concurrent utils read-write locking 
>> code in the mailbox and this exception has not again occurred. I will attach 
>> the patch I'm running on my local JAMES fork. I think the time is right to 
>> consider adding read-write locking on trunk.
>> Disadvantages (of introducing read-write locking):
>>  * Using a programmatic read-write lock will reduce throughput in a 
>> multi-user environment. The granularity is necessarily course. 
>>  * May introduce subtle programmatic deadlock or thread-starvation 
>> conditions. This may be difficult to diagnose.
>>  * There is no proof that it effects other databases
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to