Task #2508 (closed)
Opened 14 years ago
Closed 14 years ago
ome_nextval hangs on trigger
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | major | Milestone: | OMERO-Beta4.2 |
Component: | ORM | Version: | n.a. |
Keywords: | n.a. | Cc: | cxallan, jburel |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | 2010-06-10 (11) |
Description
In #1176, we moved to using our own sequence generator (ome_nextval) in order to more cleanly work with the Hibernate table-based id generator strategy. Postgres doesn't directly provide a way to grab a sequence of ids.
While working on a database trigger which inserted new rows (and therefore needed new ids), ome_nextval deadlocked. This may also be the explanation of some of the periodic database hangs.
As a result, we need to go back to using Postgres's native nextval function, since it is the only method that will permit working outside of the current transactional scope. ome_nextval will still be used to provide functionality on top of nextval.
Change History (2)
comment:1 Changed 14 years ago by jmoore
comment:2 Changed 14 years ago by jmoore
- Resolution set to fixed
- Status changed from new to closed
r7323 should close this. The ome_nextval logic is fairly complex, but is functional for the given triggers. If any hangs are seen, feel free to re-open.
(In [7323]) Adding new sequences and triggers to 4.2 DB. (See #1390, #2508)