Re: [Carbon-dev] Fix for Registry Deadlocking

2012-03-01 Thread Anjana Fernando
Hi Ajith, Can you please get the fix done to registry and test it out. IIRC, the deadlocking scenario in the code happens for update operations, the insert operation sequence seemed correct. Cheers, Anjana. On Mon, Feb 6, 2012 at 1:47 PM, Senaka Fernando wrote: > Hi Amila, Anjana, > > DimuthuG

Re: [Carbon-dev] Fix for Registry Deadlocking

2012-02-06 Thread Senaka Fernando
Hi Amila, Anjana, DimuthuG did this sometime back and also produced a spreadsheet (should be on google docs) on the sequences. But something that we probably missed (as in this case) is the locking granularity. There is a subtle difference when row-level and table-level locks are acquired in and n

Re: [Carbon-dev] Fix for Registry Deadlocking

2012-02-05 Thread Anjana Fernando
Hi Amila, On Mon, Feb 6, 2012 at 11:50 AM, Amila Suriarachchi wrote: > > > On Mon, Feb 6, 2012 at 11:35 AM, Anjana Fernando wrote: > >> Hi Amila, >> >> On Mon, Feb 6, 2012 at 10:30 AM, Amila Suriarachchi wrote: >> >>> >>> >>> On Mon, Feb 6, 2012 at 12:50 AM, Senaka Fernando wrote: >>> Hi a

Re: [Carbon-dev] Fix for Registry Deadlocking

2012-02-05 Thread Amila Suriarachchi
On Mon, Feb 6, 2012 at 11:35 AM, Anjana Fernando wrote: > Hi Amila, > > On Mon, Feb 6, 2012 at 10:30 AM, Amila Suriarachchi wrote: > >> >> >> On Mon, Feb 6, 2012 at 12:50 AM, Senaka Fernando wrote: >> >>> Hi all, >>> >>> We discussed this offline, and the issue here is valid, Anjana can >>> expl

Re: [Carbon-dev] Fix for Registry Deadlocking

2012-02-05 Thread Anjana Fernando
Hi Amila, On Mon, Feb 6, 2012 at 10:30 AM, Amila Suriarachchi wrote: > > > On Mon, Feb 6, 2012 at 12:50 AM, Senaka Fernando wrote: > >> Hi all, >> >> We discussed this offline, and the issue here is valid, Anjana can >> explain further if someone wants to understand it. > > > Can you please do

Re: [Carbon-dev] Fix for Registry Deadlocking

2012-02-05 Thread Sumedha Rubasinghe
On Mon, Feb 6, 2012 at 12:00 AM, Anjana Fernando wrote: > Hi, > > I may have possibly found a solution for the registry deadlocking for > concurrent puts/deletes. I was checking the SQL statements executed for a > put, and the list is as follows. > > SELECT REG_PATH_ID FROM REG_PATH WHERE > REG_P

Re: [Carbon-dev] Fix for Registry Deadlocking

2012-02-05 Thread Amila Suriarachchi
On Mon, Feb 6, 2012 at 12:50 AM, Senaka Fernando wrote: > Hi all, > > We discussed this offline, and the issue here is valid, Anjana can explain > further if someone wants to understand it. Can you please do that? I also thought (as Senaka mentioned) update sequence should be consistent across

Re: [Carbon-dev] Fix for Registry Deadlocking

2012-02-05 Thread Senaka Fernando
Hi all, We discussed this offline, and the issue here is valid, Anjana can explain further if someone wants to understand it. But out of the three options, right now, only #3 seems to be possible without breaking consistency. But even this needs to be tested against all DBs, because we are momenta

Re: [Carbon-dev] Fix for Registry Deadlocking

2012-02-05 Thread Senaka Fernando
Hi again, And with regard to #3, if that's a safe option go for it. That's probably due to somebody not realizing the possibility. Anyway, I'm not the expert when it comes to SQL stuff, may be Sumedha can provide some insight? Thanks, Senaka. On Mon, Feb 6, 2012 at 12:06 AM, Senaka Fernando wro

Re: [Carbon-dev] Fix for Registry Deadlocking

2012-02-05 Thread Senaka Fernando
Hi Anjana, So is this a complete sequence of operations? If so, once a write lock is acquired, IIRC it will be held until the transaction completes - am I missing something? Also, there are some INSERT statements above the deletes. What about those? Thanks, Senaka. On Mon, Feb 6, 2012 at 12:00

[Carbon-dev] Fix for Registry Deadlocking

2012-02-05 Thread Anjana Fernando
Hi, I may have possibly found a solution for the registry deadlocking for concurrent puts/deletes. I was checking the SQL statements executed for a put, and the list is as follows. SELECT REG_PATH_ID FROM REG_PATH WHERE REG_PATH_VALUE='/_system/config/abc1' AND REG_TENANT_ID=0 SELECT REG_VERSION