Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0027638 | Retail Modules | Cash up | public | 2014-09-18 16:52 | 2014-10-02 19:02 |
|
Reporter | egoitz | |
Assigned To | marvintm | |
Priority | immediate | Severity | critical | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | RR14Q4 | |
Merge Request Status | |
Review Assigned To | marvintm |
OBNetwork customer | OBPS |
Support ticket | 31173 |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0027638: The cashup process takes long in some cases and causes locks on the database |
Description | The cashup process takes long in some cases and causes locks on the database.
If many cashups are done at the same time and the first one takes long, a lock is made on the ad_sequence table to obtain the documentno for the shipment.
The rest of casuhps are locked until the first one finish.
It causes locks and performance problems on the server.
|
Steps To Reproduce | -Execute several cashups at the same time and check the pg_locks table of postgresql. |
Proposed Solution | |
Additional Information | |
Tags | Performance |
Relationships | related to | defect | 0027943 | | closed | mtaal | The OrderLoader process produce locks on the ad_sequence table. |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2014-09-18 16:52 | egoitz | New Issue | |
2014-09-18 16:52 | egoitz | Assigned To | => marvintm |
2014-09-18 16:52 | egoitz | OBNetwork customer | => Yes |
2014-09-18 16:52 | egoitz | Support ticket | => 31173 |
2014-09-18 16:52 | egoitz | Resolution time | => 1411164000 |
2014-09-18 16:52 | egoitz | Triggers an Emergency Pack | => No |
2014-09-18 16:53 | egoitz | Tag Attached: Performance | |
2014-09-26 18:02 | hgbot | Checkin | |
2014-09-26 18:02 | hgbot | Note Added: 0070443 | |
2014-09-26 18:02 | hgbot | Checkin | |
2014-09-26 18:02 | hgbot | Note Added: 0070444 | |
2014-09-26 18:02 | hgbot | Checkin | |
2014-09-26 18:02 | hgbot | Note Added: 0070445 | |
2014-09-26 18:02 | hgbot | Checkin | |
2014-09-26 18:02 | hgbot | Note Added: 0070446 | |
2014-09-26 18:03 | hgbot | Checkin | |
2014-09-26 18:03 | hgbot | Note Added: 0070447 | |
2014-09-26 18:09 | hgbot | Checkin | |
2014-09-26 18:09 | hgbot | Note Added: 0070448 | |
2014-09-26 18:09 | hgbot | Checkin | |
2014-09-26 18:09 | hgbot | Note Added: 0070449 | |
2014-09-26 18:09 | hgbot | Checkin | |
2014-09-26 18:09 | hgbot | Note Added: 0070450 | |
2014-09-26 22:34 | mtaal | Status | new => scheduled |
2014-09-26 22:34 | mtaal | Note Added: 0070456 | |
2014-09-26 22:34 | mtaal | fix_in_branch | => pi |
2014-09-26 22:34 | mtaal | Note Added: 0070457 | |
2014-09-26 22:34 | mtaal | Status | scheduled => resolved |
2014-09-26 22:34 | mtaal | Resolution | open => fixed |
2014-09-30 18:16 | jpcalvente | Issue Monitored: jpcalvente | |
2014-10-02 19:02 | marvintm | Review Assigned To | => marvintm |
2014-10-02 19:02 | marvintm | Status | resolved => closed |
2014-10-02 19:02 | marvintm | Fixed in Version | => RR14Q4 |
2014-10-22 10:23 | egoitz | Relationship added | related to 0027943 |
Notes |
|
(0070443)
|
hgbot
|
2014-09-26 18:02
|
|
|
|
(0070444)
|
hgbot
|
2014-09-26 18:02
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 7f7810cdeba3b757e8e85ecfeb123b700bb80882
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Sep 26 17:07:27 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7f7810cdeba3b757e8e85ecfeb123b700bb80882 [^]
Related to issue 27638: The cashup process takes long in some cases and causes locks on the database
- Let the flush happen just before enabling the triggers
- change the log level from info to debug
- made executeHooks protected to make it extendable (for unit testcases)
---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
|
|
|
(0070445)
|
hgbot
|
2014-09-26 18:02
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: bb9887a055cd64ae0bd2880faced99746454e15a
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Sep 26 17:09:51 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/bb9887a055cd64ae0bd2880faced99746454e15a [^]
Related to issue 27638: The cashup process takes long in some cases and causes locks on the database
- placed flush at one location
- implemented getCashCloseProcessor method to make retrieving cash close processor extendable
- moved cashUp.setProcessedbo to cash close processor as it should be there at the end
- saving the cashup is not needed as the cashup is already retrieved from hibernate, saving happens automatically
---
M src/org/openbravo/retail/posterminal/ProcessCashClose.java
---
|
|
|
(0070446)
|
hgbot
|
2014-09-26 18:02
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 7665b2eaa8ccf2e71c4eae5d73b5653965ad4d05
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Sep 26 17:50:12 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7665b2eaa8ccf2e71c4eae5d73b5653965ad4d05 [^]
Related to issue 27638: The cashup process takes long in some cases and causes locks on the database
- Only keep one flush action, is enough also for larger cashups
- Removed intermediate session clear, cashups are large enough to use clear, also gives clearer/less complex structure
- Read shipments directly from orderline, instead of using separate queries, prevents a query in the database
- Refresh of object from db not needed, adding invoiceline to orderline in the code, this works also
---
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor.java
---
|
|
|
(0070447)
|
hgbot
|
2014-09-26 18:03
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 7b650d0dfbd4ba968a1fcd1af3e27c93652f10be
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Sep 26 17:56:05 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7b650d0dfbd4ba968a1fcd1af3e27c93652f10be [^]
Related to issue 27638: The cashup process takes long in some cases and causes locks on the database
Added testcase to test performance of cashup and orderloading
---
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor.java
A src-test/org/openbravo/retail/posterminal/OBBaseRetailTest.java
A src-test/org/openbravo/retail/posterminal/POSOrderCashupPerformanceTest.java
A src-test/org/openbravo/retail/posterminal/cashup.json
A src-test/org/openbravo/retail/posterminal/order1.json
A src-test/org/openbravo/retail/posterminal/order2.json
---
|
|
|
(0070448)
|
hgbot
|
2014-09-26 18:09
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 2d6d69c19e41fc3136bfa669e1045a0338ab0079
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Sep 26 18:08:06 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2d6d69c19e41fc3136bfa669e1045a0338ab0079 [^]
Related to issue 27638, Backed out changeset 7b650d0dfbd4, files committed together
Files should be committed in separate commits
---
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor.java
R src-test/org/openbravo/retail/posterminal/OBBaseRetailTest.java
R src-test/org/openbravo/retail/posterminal/POSOrderCashupPerformanceTest.java
R src-test/org/openbravo/retail/posterminal/cashup.json
R src-test/org/openbravo/retail/posterminal/order1.json
R src-test/org/openbravo/retail/posterminal/order2.json
---
|
|
|
(0070449)
|
hgbot
|
2014-09-26 18:09
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 66be68f56a16c01623129680f237bd4925c33ccd
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Sep 26 18:08:47 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/66be68f56a16c01623129680f237bd4925c33ccd [^]
Related to issue 27638, added testcase to test/check performance
---
A src-test/org/openbravo/retail/posterminal/OBBaseRetailTest.java
A src-test/org/openbravo/retail/posterminal/POSOrderCashupPerformanceTest.java
A src-test/org/openbravo/retail/posterminal/cashup.json
A src-test/org/openbravo/retail/posterminal/order1.json
A src-test/org/openbravo/retail/posterminal/order2.json
---
|
|
|
(0070450)
|
hgbot
|
2014-09-26 18:09
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: addb7aa2c08aaa1d660a9b82da4432ef6cb6326a
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Sep 26 18:09:30 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/addb7aa2c08aaa1d660a9b82da4432ef6cb6326a [^]
Related to issue 27638: The cashup process takes long in some cases and causes locks on the database
Set the document no at the end of the ordergrouping in a separate flush, this limits the time the sequence table is locked
---
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor.java
---
|
|
|
(0070456)
|
mtaal
|
2014-09-26 22:34
|
|
|
|
(0070457)
|
mtaal
|
2014-09-26 22:34
|
|
Resolved with above commits |
|