Opened 8 years ago
Closed 8 years ago
#1519 closed defect (fixed)
Petascope_Rollback transaction when SQL query failed
Reported by: | Bang Pham Huu | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | major | Milestone: | 9.4 |
Component: | petascope | Version: | development |
Keywords: | Cc: | Vlad Merticariu, Dimitar Misev | |
Complexity: | Medium |
Description
The problem comes from #1518 and in DbMetadataSource class line 1786 when the invalid SQL query are executed, it cannot roll back the transaction
SELECT id,label FROM ps_quantity WHERE uom_id='1' AND description=''{grib:marsClass}'' AND nil_ids='{13}' ERROR: syntax error at or near "{" LINE 1: ...OM ps_quantity WHERE uom_id='1' AND description=''{grib:mars... ^
After the failing query, all other SQL query to petascopedb died due to the blocked transaction.
Caused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
it seems like the error is because it only close the transaction when it succeeds in DbMetadaSource line 1546.
It should be check all the catch SQL Exception will need to be used with transaction abort.
Note:
See TracTickets
for help on using tickets.