[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5773?page=c...
]
Steve Ebersole updated HHH-5773:
--------------------------------
Component/s: caching (L2)
Issue Type: Improvement (was: Bug)
Summary: Disable registration of AfterTransactionCompletionProcess based on
Session CacheMode (was: Session grows with long running transactions, even when flushing
and clearing regularly)
Currently the check to determine if a {{AfterTransactionCompletionProcess}} should get
registered from {{EntityAction}} looks like:
{code}
persister.hasCache() || hasPostCommitEventListeners();
{code}
The request here is to also take the current {{Session}} {{CacheMode}} into account.
There is a slight difference there though. If the cache is enabled for that persister but
the cache mode currently disables puts we need to register a slightly modified process
which can still do the invalidation, but which does not carry the additional state
(instance, state, etc)
Disable registration of AfterTransactionCompletionProcess based on
Session CacheMode
------------------------------------------------------------------------------------
Key: HHH-5773
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5773
Project: Hibernate Core
Issue Type: Improvement
Components: caching (L2), core
Affects Versions: 3.6.0
Reporter: Emond Papegaaij
The session keeps track of all changes to entities in the 'actionQueue'. This
ActionQueue contains a AfterTransactionCompletionProcessQueue, which grows rapidly with
every change/insert/delete of entities. There seems to be no way to clear this queue,
other than to commit or rollback. I can understand that Hibernate needs to keep track of
changes in a transaction, but this list should not hold references to entities. Perhaps
references can be replaced by lazy proxies?
In our case, we are trying to import many (millions) records into the database. This
needs to be performed in a single transaction. These records reference entities in a
complex (and large) data-structure. The entities in this structure are not modified, but
as the ActionQueue contains all newly inserted records, which in turn reference the
entities in this structure, the entire structure ends up in the session. Flushing and
clearing has no effect.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira