ramireddy
7th February 2002, 16:18
I would appreciate it if anybody can give any kind of input with 107 lock errors.
We get 107 lock errors very regularly while entering sales orders. Whenever a user gets stuck in sales order entry and has to kill the process, the process holds lock(s) on item master. Bt the time we realize and go into informix and clean this lock out, several other users are stuck due to contention with the same item.
Here is my question: Assuming a user is stuck in sales order entry, why should there be lock? All of baan is designed to work with delayed locking. So, if a user gets stuck, ideally there should be no locks on any tables as the commit has not happened yet and other users should not get affected. Can anybody explain this?
Something to test in Baan: Write a select on any table with "for update". Then write another select on any other table with "for update". let this program execute untill the second "for update" statement and dont commit. Do this in debugger mode. Then write another program with "for update" on the same table as the first "forupdate" of the first program. Execute the second program and try to commit ( while still sitting before commit on the first program) and you will get a 107 error. Why should the second program get a 107 error? Baan has delayed locking, so no physical locks should be placed untill we hit the commit on the first program.
example:
1) first script
db.retry.point()
select tcmcs010.*
from tcmcs010 for update
where tcmcs010._index1 = {"ABW"}
selectdo
tcmcs010.dsca = "ABCD"
db.update(ttcmcs010,db.retry)
endselect
select tcmcs021.*
from tcmcs021 for update
where tcmcs021._index1 = {"175"}
selectdo
tcmcs021.dsca = "Trinidad"
db.update(ttcmcs021,db.retry)
endselect |stop here
commit.transaction()
2) second script:
db.retry.point()
select tcmcs010.*
from tcmcs010 for update
where tcmcs010._index1 = {"ABW"}
selectdo
tcmcs010.dsca = "ABCDE"
db.update(ttcmcs010,db.retry)
endselect
commit.transaction() |fails here with 107 error.
Ramireddy
We get 107 lock errors very regularly while entering sales orders. Whenever a user gets stuck in sales order entry and has to kill the process, the process holds lock(s) on item master. Bt the time we realize and go into informix and clean this lock out, several other users are stuck due to contention with the same item.
Here is my question: Assuming a user is stuck in sales order entry, why should there be lock? All of baan is designed to work with delayed locking. So, if a user gets stuck, ideally there should be no locks on any tables as the commit has not happened yet and other users should not get affected. Can anybody explain this?
Something to test in Baan: Write a select on any table with "for update". Then write another select on any other table with "for update". let this program execute untill the second "for update" statement and dont commit. Do this in debugger mode. Then write another program with "for update" on the same table as the first "forupdate" of the first program. Execute the second program and try to commit ( while still sitting before commit on the first program) and you will get a 107 error. Why should the second program get a 107 error? Baan has delayed locking, so no physical locks should be placed untill we hit the commit on the first program.
example:
1) first script
db.retry.point()
select tcmcs010.*
from tcmcs010 for update
where tcmcs010._index1 = {"ABW"}
selectdo
tcmcs010.dsca = "ABCD"
db.update(ttcmcs010,db.retry)
endselect
select tcmcs021.*
from tcmcs021 for update
where tcmcs021._index1 = {"175"}
selectdo
tcmcs021.dsca = "Trinidad"
db.update(ttcmcs021,db.retry)
endselect |stop here
commit.transaction()
2) second script:
db.retry.point()
select tcmcs010.*
from tcmcs010 for update
where tcmcs010._index1 = {"ABW"}
selectdo
tcmcs010.dsca = "ABCDE"
db.update(ttcmcs010,db.retry)
endselect
commit.transaction() |fails here with 107 error.
Ramireddy