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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0021805
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2012-10-01 10:572016-12-02 08:18
ReportermalsasuaView Statuspublic 
Assigned Tocaristu 
PriorityurgentResolutionno change requiredFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browserGoogle Chrome
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0021805: In alert management, cursors are opened and never is closed [ORACLE]

DescriptionIn oracle database, when an alert is solved or created, cursor is opened and never is closed.

SQLs that the cursors never are closed:

UPDATE AD_ALERT SET STATUS = 'SOLVED', ...
INSERT INTO AD_ALERT (AD_ALERT_ID, AD_CLIENT_ID, AD_ORG_ID, ...


Steps To Reproduce. install module: org.openbravo.alerts.accounting
. delete accounting of a business partner category
. run SQL:
  SELECT SID, sql_text, COUNT(*)
  FROM v$open_cursor
  GROUP BY SID, sql_text
  ORDER BY COUNT(*) DESC

. run alert process immediatelly
. new alert is created
. run SQL:
  SELECT SID, sql_text, COUNT(*)
  FROM v$open_cursor
  GROUP BY SID, sql_text
  ORDER BY COUNT(*) DESC
. the cursors opened have increased
. add accounting to previous business partner category
. run SQL again:
  SELECT SID, sql_text, COUNT(*)
  FROM v$open_cursor
  GROUP BY SID, sql_text
  ORDER BY COUNT(*) DESC

. the cursors opened have increased
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on defect 00211253.0MP15 closedmarvintm a cursor is opened and not closed when a tab is related to an auxiliar input 

-  Notes
(0091999)
caristu (developer)
2016-12-02 08:18
edited on: 2016-12-02 08:21

Oracle's v$open_cursor shows cached cursors, not currently open cursors, by session. When looking for how many cursors a session has open, v$open_cursor does not provided such information. It shows the cursors in the session cursor cache for each session, not cursors that are actually open.

To monitor open cursors, query v$sesstat where name='opened cursors current'. This will give the number of currently opened cursors, by session:

--total cursors open, by session
select a.value, s.username, s.sid, s.serial#
from v$sesstat a, v$statname b, v$session s
where a.statistic# = b.statistic# and s.sid=a.sid
and b.name = 'opened cursors current';

By using this last query with the steps to reproduce, the number of records returned by the query is not being increased. Therefore after executing the alert process we can conclude that we are creating some cursors in cache but we are not leaving them open.

More info: http://www.orafaq.com/node/758 [^]


- Issue History
Date Modified Username Field Change
2012-10-01 10:57 malsasua New Issue
2012-10-01 10:57 malsasua Assigned To => AugustoMauch
2012-10-01 10:57 malsasua Web browser => Google Chrome
2012-10-01 10:57 malsasua Modules => Core
2012-10-01 10:58 malsasua Relationship added depends on 0021125
2012-10-18 10:45 egoitz Issue Monitored: egoitz
2013-04-25 08:50 alostale Tag Attached: Performance
2015-03-17 14:37 alostale Assigned To AugustoMauch => platform
2015-11-11 11:31 alostale Status new => acknowledged
2016-06-23 10:11 NaroaIriarte Assigned To platform => NaroaIriarte
2016-12-01 13:25 alostale Priority high => urgent
2016-12-01 14:12 alostale Assigned To NaroaIriarte => caristu
2016-12-02 08:14 caristu Status acknowledged => scheduled
2016-12-02 08:18 caristu Review Assigned To => caristu
2016-12-02 08:18 caristu Note Added: 0091999
2016-12-02 08:18 caristu Status scheduled => closed
2016-12-02 08:18 caristu Resolution open => no change required
2016-12-02 08:19 caristu Note Edited: 0091999 View Revisions
2016-12-02 08:21 caristu Note Edited: 0091999 View Revisions


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker