fix(reporting): resolve #283 review blockers (Print Schedules — connection deadlock + bookmarks/comments/perf) - #285
Merged
Conversation
…landed) PR #283 (Story 20.2 combined Print Schedules PDF) was merged while Sofia's CHANGES_REQUESTED review was still open, so these five review fixes did not make it into main. Applying them here as a follow-up. 1. [BLOCKER] Drop @transactional(readOnly=true) from PrintService.render. The DataSourceTransactionManager held one pooled connection for the whole method while ReportService.fillSchedule9 checked out a SECOND raw connection — so every /print including Schedule 9 pinned 2 connections on a pool of 5; ~5 concurrent print requests deadlocked until the 30s timeout. render() is six independent read-only reads (each *Service manages its own tx; the Sch 9 fill borrows/releases its own connection), so no method-wide tx is needed. 2. [BOOKMARKS] One bookmark per rendered schedule, including single-schedule prints. JR 7.0.8 batch-mode bookmarks only emit for >1 doc, so switched to a per-template outline anchor (bookmarkLevel=1) threaded via a bookmarkTitle fill parameter; renderSchedule9Pdf passes null (standalone stays bookmark-less). New IT: single Schedule 6 -> exactly one bookmark. 3. [COMMENTS-ONLY] Keep the row identifier visible when only comments print — un-gated areaLabel (Sch 6), type (Sch 7B), location (Sch 11) from p_do_print_body, matching legacy (which left those columns ungated) and Sch 5. New IT: printScheduleInformation=false + printComments=true keeps the identifier. 4. [LOG] Log deferred selections (1/2/3/4/8/10 + Mill Info) even on the allSchedules path (removed the suppression). 5. [PERF] Schedule 9 empty pre-check uses a COUNT query instead of materializing the full record list then re-querying in the template. Verified: 421 ITs green (PrintScheduleIT incl. the 2 new bookmark/identity cases), checkstyle clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gpascucci
requested review from
Rylan-cgi,
SScholefield,
adityaravi12 and
paulushcgcj
as code owners
August 14, 2026 16:12
… too
CR follow-up: logUnimplementedSelections only checked the individual deferred
flags, so a {allSchedules:true} request (individual flags unset) still didn't log
the skipped 1/2/3/4/8/10 — the exact case the review asked to cover. Include
allSchedules in the condition (the comment already described this behaviour).
Contributor
Author
Self-CR (adversarial pass over the five fixes)Reviewed each fix against its intent; all sound, and I caught + fixed one gap in my own change.
Verified: 421 ITs green + checkstyle clean; the log-only follow-up compiles clean (no test impact). Ready to merge — this brings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#283 (Story 20.2, combined Print Schedules PDF) was merged while the review was still
CHANGES_REQUESTED, so these five review fixes — including a blocker — did not make it intomain. This is the follow-up.Fixes
PrintService.renderwas@Transactional(readOnly=true)— the tx manager held one pooled connection for the whole method whileReportService.fillSchedule9checked out a second raw connection. So every/printincluding Schedule 9 pinned 2 connections on a pool of 5; ~5 concurrent prints (year-end close) deadlock until the 30s timeout.render()is six independent read-only reads — dropped the annotation (each service manages its own tx; the Sch 9 fill borrows/releases its own connection).sectionCount > 1gate meant a one-schedule/printhad no outline (violates BR-08). JR 7.0.8 batch bookmarks only emit for >1 doc, so switched to a per-template outline anchor (bookmarkLevel=1) threaded via abookmarkTitlefill param; standaloneGET /schedule9stays bookmark-less. New IT: single Schedule 6 → exactly one bookmark.printScheduleInformation=false, printComments=true,p_do_print_bodyhad been hiding the identifier columns. Un-gatedareaLabel(Sch 6),type(Sch 7B),location(Sch 11) — matching legacy (which left them ungated) and Sch 5. New IT asserts the identifier survives.allSchedulespath too.COUNTquery instead of materializing the full record list then re-querying in the template.Verification
421 ITs green (PrintScheduleIT incl. the two new bookmark/identity cases), checkstyle clean — verified in WSL against Testcontainers Oracle. Cherry-picked cleanly onto current
main.Resolves the review comments from @SScholefield and @paulushcgcj on #283.
🤖 Generated with Claude Code
Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in: