Subject | RES: RES: [IBO] Row edited but not committed - deadlock |
---|---|
Author | Hrsof@Hrsoftbrasil |
Post date | 2010-04-19T10:28:53Z |
Thanks.
By now, I set the table of Products with pessimistLocking = true, that
solved the problem.
Atenciosamente
____________________________________
Hércules Russano
<http://www.hrsoft.com.br/> http://www.hrsoft.com.br
HRsoft Informática - Rio de Janeiro - Brasil
(21) - 2601-3970 - 3246-2342
De: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] Em nome de
Geoff Worboys
Enviada em: domingo, 18 de abril de 2010 20:34
Para: IBObjects@yahoogroups.com
Assunto: Re: RES: [IBO] Row edited but not committed - deadlock
a separate stock quantity table where, during normal day-to-
day operations, records are only inserted:
+------------+ +----------+
| stock-item |----<| quantity |
+------------+ +----------+
-1 (1 sold)
-2 (2 sold)
+10 (10 purchased)
Checking the stock quantity sums the relevant records in the
quantity table. Because records are only ever inserted no
update conflict ever occurs. At some useful interval (stock-
take or monthly or whatever) some management process could be
run to consolidate the records in the quantity table (to
prevent the volume causing significant performance issues).
One of the advantages of this arrangement is the ability to
better cope with user interface vagaries. We all know that
users do inconvenient things like leave a record incomplete
for long periods of time (they answer the phone, go to lunch
or whatever. A system such as described above allows you to
avoid blocking access to all other users in the most usual
case (we hope) of there still being stock available to sell.
Of course if you insist on blocking all other users... well
that is why the PessimisticLocking feature is provided.
There are many possible variations on this theme.
--
Geoff Worboys
Telesis Computing
Nenhum vírus encontrado nessa mensagem recebida.
Verificado por AVG - www.avgbrasil.com.br
Versão: 8.5.437 / Banco de dados de vírus: 271.1.1/2816 - Data de
Lançamento: 04/17/10 06:31:00
[Non-text portions of this message have been removed]
By now, I set the table of Products with pessimistLocking = true, that
solved the problem.
Atenciosamente
____________________________________
Hércules Russano
<http://www.hrsoft.com.br/> http://www.hrsoft.com.br
HRsoft Informática - Rio de Janeiro - Brasil
(21) - 2601-3970 - 3246-2342
De: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] Em nome de
Geoff Worboys
Enviada em: domingo, 18 de abril de 2010 20:34
Para: IBObjects@yahoogroups.com
Assunto: Re: RES: [IBO] Row edited but not committed - deadlock
> Yes. In a ERP System, with Stock Control. When a user need to...
> updated the quantity of a item.
> But if the second transaction knew that the item was beingYou can also avoid "the risk of deadlock messages" by using
> updated in another transaction, then waited for the release
> and commit, and conclude the post, without the risk of
> dealock messages.
a separate stock quantity table where, during normal day-to-
day operations, records are only inserted:
+------------+ +----------+
| stock-item |----<| quantity |
+------------+ +----------+
-1 (1 sold)
-2 (2 sold)
+10 (10 purchased)
Checking the stock quantity sums the relevant records in the
quantity table. Because records are only ever inserted no
update conflict ever occurs. At some useful interval (stock-
take or monthly or whatever) some management process could be
run to consolidate the records in the quantity table (to
prevent the volume causing significant performance issues).
One of the advantages of this arrangement is the ability to
better cope with user interface vagaries. We all know that
users do inconvenient things like leave a record incomplete
for long periods of time (they answer the phone, go to lunch
or whatever. A system such as described above allows you to
avoid blocking access to all other users in the most usual
case (we hope) of there still being stock available to sell.
Of course if you insist on blocking all other users... well
that is why the PessimisticLocking feature is provided.
There are many possible variations on this theme.
--
Geoff Worboys
Telesis Computing
Nenhum vírus encontrado nessa mensagem recebida.
Verificado por AVG - www.avgbrasil.com.br
Versão: 8.5.437 / Banco de dados de vírus: 271.1.1/2816 - Data de
Lançamento: 04/17/10 06:31:00
[Non-text portions of this message have been removed]