Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too manay 'Potential lock conflict' #596

Open
daiagou opened this issue Jun 2, 2023 · 0 comments
Open

Too manay 'Potential lock conflict' #596

daiagou opened this issue Jun 2, 2023 · 0 comments

Comments

@daiagou
Copy link

daiagou commented Jun 2, 2023

Due to foreign keys, there may be some deadlocks, lock wait timeout, and Potential lock conflict during execution.
Here I will list some of the 'Potential lock conflicts':

2015990-00: AT_ENTITY:mantle.account.payment.Payment (AUTHZA_CREATE:create) 0ms TX 17487
2015991-01: AT_SERVICE:mantle.account.PaymentServices.create#Payment (AUTHZA_CREATE:inline) 9ms TX 17487
2015992-02: AT_SERVICE:mantle.order.OrderServices.add#OrderPartPayment (AUTHZA_ALL:inline) 22ms TX 17487
2016001-== OTHER LOCK 0 thread MoquiWorker-12 TX 17484 began 2023-03-31 11:03:55.311 at:
2016002-00: AT_ENTITY:mantle.account.payment.Payment (AUTHZA_UPDATE:update) 36ms TX 17484
2016003-01: AT_SERVICE:mantle.account.InvoiceServices.create#EntireOrderPartInvoice (AUTHZA_CREATE:inline) 145ms TX 
9105-00: AT_ENTITY:moqui.security.UserLoginKey (AUTHZA_CREATE:create) 0ms TX 17728
9112-== OTHER LOCK 0 thread qtp169880779-18 TX 101 began 1970-01-01 07:59:59.999 at:
9113-00: AT_ENTITY:moqui.security.UserLoginKey (AUTHZA_DELETE:delete) 231690958ms TX 101
68-00: AT_ENTITY:mantle.order.OrderHeader (AUTHZA_CREATE:create) 0ms TX 2286
69-01: AT_SERVICE:mantle.order.OrderServices.create#Order (AUTHZA_CREATE:inline) 5ms TX 2286
77-== OTHER LOCK 0 thread MoquiWorker-4 TX 2279 began 2023-03-28 19:42:31.062 at:
78-00: AT_ENTITY:mantle.order.OrderHeader (AUTHZA_UPDATE:update) 348ms TX 2279
644-00: AT_ENTITY:mantle.order.OrderHeader (AUTHZA_CREATE:create) 0ms TX 2311
645-01: AT_SERVICE:mantle.order.OrderServices.create#Order (AUTHZA_CREATE:inline) 5ms TX 2311
653-== OTHER LOCK 0 thread MoquiWorker-4 TX 2309 began 2023-03-28 19:42:41.151 at:
654-00: AT_ENTITY:mantle.order.OrderPart (AUTHZA_UPDATE:update) 349ms TX 2309

I raise a question - do foreign keys need to be explicitly defined? Can they be based on convention or only defined in the entity XML file without being directly represented in the database? Would this improve performance and help solve many deadlock problems?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant