Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034236
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Y. DBSourceManagerminorhave not tried2016-10-19 10:232016-12-16 18:39
ReportercaristuView Statuspublic 
Assigned Tocaristu 
PriorityhighResolutionfixedFixed in Version3.0PR17Q1
StatusclosedFix in branchFixed in SCM revisioncb46c26bac25
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0034236: newIndexesPostAction is executing duplicated actions

DescriptionAt 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 ReproduceExecute 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 SolutionSend to new newIndexesPostAction a list of the new indexes of the current table in the loop
TagsPerformance
Attached Filesdiff file icon issue34236.diff [^] (4,802 bytes) 2016-10-19 10:29 [Show Content]
diff file icon testCase34236.diff [^] (3,849 bytes) 2016-10-19 10:41 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0030525 closedAugustoMauch Provide support in DBSourceManager to define an operator class in index columns 
related to feature request 0032211 closedcaristu support for partial indexes 

-  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
Powered by Mantis Bugtracker