Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0039717 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2018-11-29 12:17 | 2018-12-11 20:22 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR19Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 3ff8ce5616bb | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | Sandrahuguet | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0039717: unnecesary contention to create new documents in UI | |||||||
Description | It is not possible to create a new document in UI while there is a transaction holding a lock for that same sequence type. | |||||||
Steps To Reproduce | 1. In psql execute and keep it open with the transaction active: pi=> begin; BEGIN pi=> select AD_Sequence_DocType('466AF4B0136A4A3F9F84129711DA8BD3', '23C59575B9CF467C9620760EB255B389', 'N'); 2. Log in as F&B admin 3. Open Sales Order window 4. Click on new -> It is not possible to edit the new record, the UI keeps frozen waiting for default values 5. In pgsql execute commit; to finalize the transaction -> Now the default values appear and it is possible to continue | |||||||
Proposed Solution | The document proposed in UI on new records is just a proposal which is later properly set when saving the record. So there is no need to wait for locks in ad_sequence, it's better to provide a document number already proposed to a different document to fix it afterwards rather than waiting it to be unlocked. | |||||||
Tags | Performance | |||||||
Attached Files | ||||||||
![]() |
|||||||||||||||
|
![]() |
|
(0108221) hgbot (developer) 2018-12-03 09:57 |
Repository: erp/devel/pi Changeset: 3ff8ce5616bb33fc8a92b88fd2dfcda41a2b14f4 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Fri Nov 30 11:55:27 2018 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/3ff8ce5616bb33fc8a92b88fd2dfcda41a2b14f4 [^] fixed bug 39717: unnecesary contention to create new documents in UI AD_Sequence_DocType acquired a "FOR UPDATE" lock whenever it was invoked regardless whether it updated the sequence number or only returned a number proposal. The latter is the the case of proposing document numbers while creating from UI, which was forced to be sequentially executed due to this lock. AD_Sequence_DocType behavior has been changed to: 1. If AD_Sequence_DocType is not going to finally update AD_Sequence, no lock is acquired. 2. Acquire the lock only if AD_Sequence is updated. Even this lock has been relaxed in PostgreSQL from FOR UPDATE to FOR NO KEY UPDATE, by doing the update (which aquires the lock) before doing the select, which now needs to know in which case we are in order to properly calculate the actual number. The same applies to AD_Sequence_Doc. --- M src-db/database/model/functions/AD_SEQUENCE_DOC.xml M src-db/database/model/functions/AD_SEQUENCE_DOCTYPE.xml --- |
(0108293) Sandrahuguet (viewer) 2018-12-05 15:38 |
Code review + testing OK |
(0108510) hudsonbot (viewer) 2018-12-11 20:22 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^] Maturity status: Test |
![]() |
|||
Date Modified | Username | Field | Change |
2018-11-29 12:17 | alostale | New Issue | |
2018-11-29 12:17 | alostale | Assigned To | => platform |
2018-11-29 12:17 | alostale | OBNetwork customer | => No |
2018-11-29 12:17 | alostale | Modules | => Core |
2018-11-29 12:17 | alostale | Triggers an Emergency Pack | => No |
2018-11-29 12:17 | alostale | Tag Attached: Performance | |
2018-11-29 12:17 | alostale | Relationship added | related to 0039672 |
2018-11-30 11:59 | alostale | Relationship added | related to 0015801 |
2018-11-30 16:07 | galderromo | Issue Monitored: galderromo | |
2018-12-03 09:56 | alostale | Assigned To | platform => alostale |
2018-12-03 09:56 | alostale | Review Assigned To | => vmromanos |
2018-12-03 09:57 | hgbot | Checkin | |
2018-12-03 09:57 | hgbot | Note Added: 0108221 | |
2018-12-03 09:57 | hgbot | Status | new => resolved |
2018-12-03 09:57 | hgbot | Resolution | open => fixed |
2018-12-03 09:57 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/3ff8ce5616bb33fc8a92b88fd2dfcda41a2b14f4 [^] |
2018-12-05 12:00 | Sandrahuguet | Review Assigned To | vmromanos => Sandrahuguet |
2018-12-05 15:38 | Sandrahuguet | Note Added: 0108293 | |
2018-12-05 15:38 | Sandrahuguet | Status | resolved => closed |
2018-12-05 15:38 | Sandrahuguet | Fixed in Version | => 3.0PR19Q1 |
2018-12-11 20:22 | hudsonbot | Checkin | |
2018-12-11 20:22 | hudsonbot | Note Added: 0108510 |
Copyright © 2000 - 2009 MantisBT Group |