Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0034236 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] Y. DBSourceManager | minor | have not tried | 2016-10-19 10:23 | 2016-12-16 18:39 | |||
Reporter | caristu | View Status | public | |||||
Assigned To | caristu | |||||||
Priority | high | Resolution | fixed | Fixed in Version | 3.0PR17Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | cb46c26bac25 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | alostale | |||||||
Web browser | ||||||||
Modules | Core | |||||||
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 | |||||||
Tags | Performance | |||||||
Attached Files | issue34236.diff [^] (4,802 bytes) 2016-10-19 10:29 [Show Content]
testCase34236.diff [^] (3,849 bytes) 2016-10-19 10:41 [Show Content] | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Notes | |
(0090694) caristu (developer) 2016-10-19 10:30 edited on: 2016-10-19 10:30 |
Attached patch with the proposed solution |
(0092012) hgbot (developer) 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 (developer) 2016-12-02 10:34 |
Repository: erp/devel/pi Changeset: 0fba1fd4f0761c0dc6fbeb52b6034300e6b4b309 Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Fri Dec 02 10:33:48 2016 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/0fba1fd4f0761c0dc6fbeb52b6034300e6b4b309 [^] related to issue 34236: updated dbsourcemanager library --- M src-db/database/lib/dbsourcemanager.jar --- |
(0092309) alostale (manager) 2016-12-13 11:23 |
code reviewed and tested |
(0092684) hudsonbot (developer) 2016-12-16 18:39 |
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/dc8bf00badd0 [^] Maturity status: Test |
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 | View Revisions |
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 | View Revisions |
2016-10-19 10:41 | caristu | Steps to Reproduce Updated | View Revisions |
2016-10-19 10:41 | caristu | File Added: testCase34236.diff | |
2016-10-19 10:42 | caristu | Steps to Reproduce Updated | View Revisions |
2016-10-19 10:43 | caristu | Steps to Reproduce Updated | View Revisions |
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 |
Copyright © 2000 - 2009 MantisBT Group |