Conversation
04076fd to
a1cc61f
Compare
sebr72
left a comment
There was a problem hiding this comment.
Thanks for the fixes. Could you please add a test, justifying why these changes were required ?
core/src/main/java/org/mapfish/print/servlet/job/impl/hibernate/PrintJobDao.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/mapfish/print/servlet/job/impl/hibernate/PrintJobDao.java
Show resolved
Hide resolved
The failure happens because of the difference in the mapfish_spring_hibernate.xml files:
So the tests were not validating the behavior at runtime. |
|
The last commit (ef04b27) is needed to reduce amount of the database structure changes, e.g.:
The full DB structure comparison was done using the following steps:
The results were in line with expectations:
|
|
Current status: one failing test, "PrintApiTest > testSecuredTemplate_CreateMap()" Test fails when running acceptance tests in clustering mode. Not a regression, because it failed with the same error before spring7 migration and after the migration. |
There was a problem hiding this comment.
Pull request overview
Updates the Hibernate/Spring configuration and entity mappings so Hibernate can discover the accounting entity and better handle longer string/JSON fields in the PostgreSQL-backed job/accounting tables.
Changes:
- Add
org.mapfish.print.servlet.jobto HibernatepackagesToScansoHibernateAccountingEntryis discovered as an entity. - Adjust job-related entity columns to use PostgreSQL
TEXTfor potentially long string fields/identifiers. - Update polling lock behavior to use
UPGRADE_SKIPLOCKEDand remove the previous pessimistic-lock exception fallback.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| core/src/main/resources/mapfish-spring-hibernate.xml | Ensures Hibernate scans the package containing HibernateAccountingEntry. |
| core/src/main/java/org/mapfish/print/servlet/job/impl/hibernate/PrintJobDao.java | Changes polling lock mode to skip locked rows and simplifies result handling. |
| core/src/main/java/org/mapfish/print/servlet/job/impl/PrintJobStatusImpl.java | Switches key/error columns to PostgreSQL TEXT. |
| core/src/main/java/org/mapfish/print/servlet/job/impl/PrintJobResultImpl.java | Switches URI/metadata/reference columns to PostgreSQL TEXT. |
| core/src/main/java/org/mapfish/print/servlet/job/PrintJobEntry.java | Switches embedded reference/request columns to PostgreSQL TEXT. |
| core/src/main/java/org/mapfish/print/servlet/job/HibernateAccountingEntry.java | Uses PostgreSQL TEXT for string columns and adds Hibernate JSON type mapping for jsonb stats. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
core/src/main/java/org/mapfish/print/servlet/job/impl/hibernate/PrintJobDao.java
Outdated
Show resolved
Hide resolved
=> 6c82a26 |
sebr72
left a comment
There was a problem hiding this comment.
Great work. Thanks.
Quick note: We will add the tests for this PR using a different PR.
…e/PrintJobDao.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.