Session grows with long running transactions, even when flushing and clearing regularly
---------------------------------------------------------------------------------------
Key: HHH-5773
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5773
Project: Hibernate Core
Issue Type: Bug
Components: 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