int-modules-pgsql - Build # 1060 - Fixed:
Check console output at https://ci.openbravo.com/job/int-modules-pgsql/1060/ to
view the results.
Committers since last success:
Changes for Build #1059
Changes for Build #1060
Víctor Martínez Romanos <[email protected]> null
Fixed bug 29664: Create Price List performance
The patch contains the following changes that improve the process performance
(in my local environment the performance is increased an average of 80%):
1. count(*) inside M_GET_NO_TRX_PRODUCT_COST has been rewritten to use exists
clause
2. Added 2 indices to M_Product_PO table on M_PRODUCT_ID and C_BPARTNER_ID
columns to reduce seq. scans on this table
3. M_PRICELIST_CREATE: Force to analyze C_TEMP_Selection table in Postgres
According to PostgreSQL documentation, the autovacuum daemon cannot access and
therefore cannot vacuum or analyze temporary tables. So it's recommended to run
ANALYZE after the table is populated to improve performance.
Oracle doesn't seem to be affected by this problem, so the analyze is only
executed for postgres
4. M_PRICELIST_CREATE: Complex queries that fill the C_TEMP_Selection has been
rewritten using a dynamic SQL run through the EXECUTE command.
Although these queries are in general fast, they are executed as many times as
records to be inserted into the Price List. So, the bigger amount of records
the slower the process is.
It has been detected that the execution plan created for these queries can be
improved a lot if we remove useless parts in the where clause (OR stuff).
That's why we dynamically build the sql based on the parameters, which
drastically improves the execution plan performance.
5. M_PRICELIST_CREATE: Removed useless join to ad_client table to calculate the
client's currency. Instead we get it at the beginning of the process just one
time.
6. M_PRICELIST_CREATE: Removed code included into the IF (v_Costbased = 'N'AND
(v_PriceList_Version_Base_ID IS NULL)). This code is never executed, because
there is a validation at the beginning of the process to avoid that situation.
Other changes not included that could improve performance:
1. Changing the db functions ad_isorgincluded and ad_org_isinnaturaltree from
VOLATILE to STABLE reduces execution time for cost based price lists.
Right now the DBSM doesn't support this flag, so a feature request #29943 has
been created
src-db/database/model/functions/M_GET_NO_TRX_PRODUCT_COST.xml
src-db/database/model/functions/M_PRICELIST_CREATE.xml
src-db/database/model/tables/M_PRODUCT_PO.xml
Atul Gaware <[email protected]> null
Fixes Issue 29962:Wrong storage bin can be selected in Pending Goods Receipt
window
inpadOrgId is passed as a input parameter to filter locator in onloadfunctions
method. Session variable Locator.adorgid is set to this parameter value.
src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.html
src/org/openbravo/erpCommon/info/Locator.java
Víctor Martínez Romanos <[email protected]> null
Related to issue 27262: Run direct update query to improve performance
Instead of getting all the sales order lines to update the reference line, we
have replaced by a direct Update HQL, which improves performance and reduces
the memory usage
src/org/openbravo/event/OrderLineEventHandler.java
Atul Gaware <[email protected]> null
Fixes Issue 27262:After using copy from order the old order can not be
removed
A event handler is implemented to achieve the functionality.
src/org/openbravo/event/OrderLineEventHandler.java
Naroa Iriarte <[email protected]> null
Related with issue 27445: Update the copyright year
The year of the copyright has been updated.
src-db/database/model/functions/AD_TABLE_IMPORT.xml
Naroa Iriarte <[email protected]> null
Fixed issue 27445:ad_table_import function has two lines with wrong
datatype.
In the AD_TABLE_IMPORT.xml, there were two values assigned with wrong type of
data.
These were integer and should be varchar.
To fix this, those two values have been changed to varchar.
To test this after the change, a new table has been created, and the "Create
Columns from DB"
process has been executed. It works correctly.
src-db/database/model/functions/AD_TABLE_IMPORT.xml
Martin Taal <[email protected]> null
Related to issue 29766: Retail Operations Buffer: store all transactions in
operations table before processing
- Don't queue complete entry but only needed id's to recreate obcontext and
reload entry
- Only load maxBatchSize per type of data, handling each type of data
separately makes them less influence eachother, the order of the type of data
is based on sequence of list reference, order makes business sense also
- Added process to reprocess entries which are in error
- added several configuration parameters which allow controlling number of
threads, queue size and task queue size from properties, sensible defaults have
been set, also prevention mechanism for 'crazy' values has been implemented
- centralized the threadpool, so all processors share the same queue together
with the main thread
- the main thread now uses a scroll method, importentries are removed from the
session right after assigning to the processor to decrease memory foot print
- the main thread now processes entries by type of data, in order of the
sequence number of the type of data, this gives better predictable results and
also gives a better change that different types of data don't block eachother
- replaced the stored column with the created column, to make table smaller,
revisited the index
- added role to the import entry table, so that it is stored with the entry, as
it is needed to rebuild the obcontext when processing the entry, as the role
of the user can have changed or the default role is not suited for the entry to
be handled.
- made field length of json and errorinfo columns to 10 million, added testcase
to proof that 10million characters can be saved in the json/errorinfo columns
- let the ImportEntryManager thread start when mobile core starts in the
application, using a context listener
- when adding a new import entry check both in the import entry as well as in
the import entry archive table if it was already passed in
- don't wait anymore after waking up from the managerWaitTime
- when saving import entry as error, make sure that the obcontext is only
temporarily replaced with the admin context, restore the previous context
- set the thread name in the threadfactory
src-test/src/org/openbravo/test/system/ImportEntrySizeTest.java
src/org/openbravo/service/importprocess/ImportReprocessErrorEntries.java
src/org/openbravo/service/importprocess/ProcessImportEntriesProcessActionHandler.java
src-db/database/model/tables/C_IMPORT_ENTRY.xml
src-db/database/model/tables/C_IMPORT_ENTRY_ARCHIVE.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_PROCESS.xml
src-db/database/sourcedata/AD_TAB.xml
src-test/src/org/openbravo/test/AllAntTaskTests.java
src-test/src/org/openbravo/test/AllQuickAntTaskTests.java
src-test/src/org/openbravo/test/AntTaskTests.java
src/org/openbravo/service/importprocess/ImportEntryArchiveManager.java
src/org/openbravo/service/importprocess/ImportEntryManager.java
src/org/openbravo/service/importprocess/ImportEntryProcessor.java
src/org/openbravo/service/importprocess/ImportProcessUtils.java
Last 20 lines of the console output:
[...truncated 3745 lines...]
Total time: 2 seconds
executing script 'Tomcat stop'
[int-modules-pgsql] $ /bin/bash /tmp/build_step_template264416031500522054.sh
ENABLE
DEBUG: Tomcat stop called with parameters: ENABLED=ENABLE
* Stopping Tomcat servlet engine for Openbravo tomcat
...done.
executing script 'Check log'
[int-modules-pgsql] $ /bin/bash /tmp/build_step_template3897045668048899485.sh
ENABLE
DEBUG: Check log called with parameters: ENABLED=
Check log: openbravo.log is clean
Recording test results
Archiving artifacts
Checking \] ERROR|\] WARN
Email was triggered for: Fixed
Trigger Success was overridden by another trigger and will not send an email.
Sending email for trigger: Fixed
------------------------------------------------------------------------------
_______________________________________________
Openbravo-builds mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-builds