Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 220805 Details for
Bug 364105
[DB] ImplementationError: "SELECT ..." already in cache
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for SmartPreparedStatementCache to record allocations of CachedPreparedStatements
SmartPreparedStatementCache.patch (text/plain), 1.80 KB, created by
András Péteri
on 2012-09-06 16:39:43 EDT
(
hide
)
Description:
Patch for SmartPreparedStatementCache to record allocations of CachedPreparedStatements
Filename:
MIME Type:
Creator:
András Péteri
Created:
2012-09-06 16:39:43 EDT
Size:
1.80 KB
patch
obsolete
>diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/SmartPreparedStatementCache.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/SmartPreparedStatementCache.java >index d9c4204..973bdbf 100644 >--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/SmartPreparedStatementCache.java >+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/SmartPreparedStatementCache.java >@@ -119,9 +119,12 @@ > lists[cachedStatement.getProbability().ordinal()].add(cachedStatement); > > // put into lookup table >- if (lookup.put(cachedStatement.getSQL(), cachedStatement) != null) >+ CachedPreparedStatement oldCachedPreparedStatement = lookup.put(cachedStatement.getSQL(), cachedStatement); >+ >+ if (oldCachedPreparedStatement != null) > { >- throw new ImplementationError(cachedStatement.getSQL() + " already in cache"); //$NON-NLS-1$ >+ throw new ImplementationError( >+ cachedStatement.getSQL() + " already in cache", oldCachedPreparedStatement.getInitStackException()); //$NON-NLS-1$ > } > > // handle capacity overflow >@@ -245,6 +248,8 @@ > > private PreparedStatement statement; > >+ private Exception initStackException; >+ > /** > * DL field > */ >@@ -261,6 +266,8 @@ > probability = prob; > statement = stmt; > timeStamp = System.currentTimeMillis(); >+ initStackException = new Exception("Previous cached statement was initialized here"); >+ initStackException.fillInStackTrace(); > } > > public PreparedStatement getPreparedStatement() >@@ -288,5 +295,10 @@ > { > return probability; > } >+ >+ public Exception getInitStackException() >+ { >+ return initStackException; >+ } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 364105
:
220804
| 220805 |
221814