- Management of database connections for DSpace going forward (7.0 and beyond). What behavior is ideal? Also see notes at DSpace Database Access
- In DSpace 5, each "Context" established a new DB connection. Context then committed or aborted the connection after it was done (based on results of that request). Context could also be shared between methods if a single transaction needed to perform actions across multiple methods.
- In DSpace 6, Hibernate manages the DB connection pool. Each thread grabs a Connection from the pool. This means two Context objects could use the same Connection (if they are in the same thread). In other words, code can no longer assume each
new Context()is treated as a new database transaction.
- Should we be making use of
SessionFactory.openSession()for READ-ONLY Contexts (or any change of Context state) to ensure we are creating a new Connection (and not simply modifying the state of an existing one)? Currently we always use
SessionFactory.getCurrentSession()in HibernateDBConnection, which doesn't guarantee a new connection: https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace-api/src/main/java/org/dspace/core/HibernateDBConnection.java
- Should we be making use of
- Bulk operations, such as loading batches of items or doing mass updates, have another issue: transaction size and lifetime. Operating on 1 000 000 items in a single transaction can cause enormous cache bloat, or even exhaust the heap.
- Bulk loading should be broken down by committing a modestly-sized batch and opening a new transaction at frequent intervals. (A consequence of this design is that the operation must leave enough information to restart it without re-adding work already committed, should the operation fail or be prematurely terminated by the user. The SAF importer is a good example.)
- Mass updates need two different transaction lifetimes: a query which generates the list of objects on which to operate, which lasts throughout the update; and the update queries, which should be committed frequently as above. This requires two transactions, so that the updates can be committed without ending the long-running query that tells us what to update.
Help us test / code review! These are tickets needing code review/testing and flagged for a future release (ordered by release & priority)
Expand Jira server DuraSpace JIRA columns key,summary,type,created,updated,assignee,reporter,priority,status,fixversions maximumIssues 20 jqlQuery filter=13905 ORDER BY fixVersion DESC, priority DESC serverId c815ca92-fd23-34c2-8fe3-956808caf8c5
Newly created tickets this week:
Expand Jira server DuraSpace JIRA columns key,summary,type,created,assignee,reporter,priority,status maximumIssues 20 jqlQuery filter=13902 serverId c815ca92-fd23-34c2-8fe3-956808caf8c5
Old, unresolved tickets with activity this week:
Expand Jira server DuraSpace JIRA columns key,summary,type,created,updated,assignee,reporter,priority,status maximumIssues 20 jqlQuery filter=13906 serverId c815ca92-fd23-34c2-8fe3-956808caf8c5
Tickets resolved this week:
Expand Jira server DuraSpace JIRA columns key,summary,type,created,assignee,reporter,priority,status,resolution maximumIssues 20 jqlQuery filter=13903 serverId c815ca92-fd23-34c2-8fe3-956808caf8c5
Tickets requiring review. This is the JIRA Backlog of "Received" tickets:
Expand Jira server DuraSpace JIRA columns key,summary,type,created,updated,assignee,reporter,priority maximumIssues 20 jqlQuery filter=10152 serverId c815ca92-fd23-34c2-8fe3-956808caf8c5