Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0034236 | Openbravo ERP | Y. DBSourceManager | public | 2016-10-19 10:23 | 2016-12-16 18:39 |
|
Reporter | caristu | |
Assigned To | caristu | |
Priority | high | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR17Q1 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0034236: newIndexesPostAction is executing duplicated actions |
Description | At this point[1] newIndexesPostAction is being executed once per table. Each execution contains the map of new indexes even if those indexes does not belong to the current table in the loop.
This causes that the post actions (for example creating new comments) are being executed once per table, but they should be executed just once.
[1] https://code.openbravo.com/erp/devel/dbsm-main/file/ee257b63e917/src/org/apache/ddlutils/platform/SqlBuilder.java#l809 [^] |
Steps To Reproduce | Execute the attached test case (testCase34236.diff) which does the following:
1) Creates a model with two tables
2) Prints the statements needed to add a new function based index with an operator class into ONE table of the model
Notice that the following statement is executed twice (once per table in the model):
COMMENT ON TABLE TEST IS 'OP_CLASS_INDEX1.functionBasedColumn.operatorClass=varchar_pattern_ops$'
It should be executed once as we are adding a new index to just one of the tables |
Proposed Solution | Send to new newIndexesPostAction a list of the new indexes of the current table in the loop |
Additional Information | |
Tags | Performance |
Relationships | related to | feature request | 0030525 | | closed | AugustoMauch | Provide support in DBSourceManager to define an operator class in index columns | related to | feature request | 0032211 | | closed | caristu | support for partial indexes |
|
Attached Files | issue34236.diff (4,802) 2016-10-19 10:29 https://issues.openbravo.com/file_download.php?file_id=9930&type=bug testCase34236.diff (3,849) 2016-10-19 10:41 https://issues.openbravo.com/file_download.php?file_id=9931&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2016-10-19 10:23 | caristu | New Issue | |
2016-10-19 10:23 | caristu | Assigned To | => platform |
2016-10-19 10:23 | caristu | Modules | => Core |
2016-10-19 10:23 | caristu | Triggers an Emergency Pack | => No |
2016-10-19 10:27 | caristu | Description Updated | bug_revision_view_page.php?rev_id=13407#r13407 |
2016-10-19 10:28 | caristu | Relationship added | related to 0030525 |
2016-10-19 10:28 | caristu | Relationship added | related to 0032211 |
2016-10-19 10:29 | caristu | File Added: issue34236.diff | |
2016-10-19 10:30 | caristu | Note Added: 0090694 | |
2016-10-19 10:30 | caristu | Note Edited: 0090694 | bug_revision_view_page.php?bugnote_id=0090694#r13409 |
2016-10-19 10:41 | caristu | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=13411#r13411 |
2016-10-19 10:41 | caristu | File Added: testCase34236.diff | |
2016-10-19 10:42 | caristu | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=13412#r13412 |
2016-10-19 10:43 | caristu | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=13413#r13413 |
2016-10-31 18:56 | caristu | Tag Attached: Performance | |
2016-12-01 13:02 | alostale | Status | new => acknowledged |
2016-12-01 13:20 | alostale | Priority | high => normal |
2016-12-01 14:01 | alostale | Priority | normal => high |
2016-12-01 14:13 | alostale | Assigned To | platform => caristu |
2016-12-02 10:26 | hgbot | Checkin | |
2016-12-02 10:26 | hgbot | Note Added: 0092012 | |
2016-12-02 10:26 | hgbot | Status | acknowledged => resolved |
2016-12-02 10:26 | hgbot | Resolution | open => fixed |
2016-12-02 10:26 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/dbsm-main/rev/cb46c26bac25b58f43d8102538ae757fb7c343ac [^] |
2016-12-02 10:34 | hgbot | Checkin | |
2016-12-02 10:34 | hgbot | Note Added: 0092014 | |
2016-12-02 10:35 | caristu | Review Assigned To | => alostale |
2016-12-13 11:23 | alostale | Note Added: 0092309 | |
2016-12-13 11:23 | alostale | Status | resolved => closed |
2016-12-13 11:23 | alostale | Fixed in Version | => 3.0PR17Q1 |
2016-12-16 18:39 | hudsonbot | Checkin | |
2016-12-16 18:39 | hudsonbot | Note Added: 0092684 | |
Notes |
|
|
Attached patch with the proposed solution
|
|
|
(0092012)
|
hgbot
|
2016-12-02 10:26
|
|
Repository: erp/devel/dbsm-main
Changeset: cb46c26bac25b58f43d8102538ae757fb7c343ac
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Dec 02 10:24:32 2016 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/cb46c26bac25b58f43d8102538ae757fb7c343ac [^]
fixes issue 34236: newIndexesPostAction is executing duplicated actions
This refactor allows to execute the new index post actions just once per table in the model. Added a new test case also to add coverage to this scenario.
---
M src-test/src/org/openbravo/dbsm/test/model/OperatorClassIndexes.java
M src/org/apache/ddlutils/platform/SqlBuilder.java
M src/org/apache/ddlutils/platform/oracle/Oracle8Builder.java
A src-test/model/indexes/MODEL_WITH_TWO_TABLES.xml
A src-test/model/indexes/MODEL_WITH_TWO_TABLES_AND_INDEX.xml
---
|
|
|
(0092014)
|
hgbot
|
2016-12-02 10:34
|
|
|
|
|
|
|
|
|