Skip to content

Avoid successful session-setup logging overhead - #232

Closed
krowvin wants to merge 2 commits into
HydrologicEngineeringCenter:mainfrom
krowvin:bugfix/session-setup-logging
Closed

krowvin wants to merge 2 commits into
HydrologicEngineeringCenter:mainfrom
krowvin:bugfix/session-setup-logging

Conversation

@krowvin

@krowvin krowvin commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Remove successful cwms_env.set_session_user_direct logging from pooled connection setup, retaining the WEB_USER check, identity/office reset, read-only reset, and unauthorized-attempt logging.

Companion CDA PR: USACE/cwms-data-api#1956. Mike's overlapping #230 removes the logging helper and changes failure reporting as well; this narrower variant remains here as the tested comparison, and can be replaced by his change after validation.

Related to USACE/cwms-data-api#1955: these measurements inform the investigation of pool sizing and isolation for short- and long-running requests.

Performance and resources

Part of an exhaustive local performance pass across CDA and Oracle. Five fresh sessions per phase, logging on/off/on, 20 setup calls per session:

Metric (mean per session) Before: logging on After: success logging off
Repeated setup time 7.35 ms 1.38 ms
PGA used after setup 12.14 MiB 2.62 MiB
PGA allocated after setup 12.85 MiB 2.88 MiB

Re-enabling logging returned PGA used to 11.80 MiB and repeated setup to 7.27 ms. The reported eight-second stall did not reproduce locally.

Test resource Configuration
Database Disposable Oracle Free 23.5 container
Physical sessions 5 per phase; 15 total
Setup calls 20 per session; 300 total
Combined CDA fixture 2 API processors, 2-GiB heap, pool maximum 30

For review: @MikeNeilson.

Validation

The fixture package compiled; 300 identity checks and 150 no-office read-only resets passed. The probe disabled only the successful log call; this patch also removes its unused message construction. Combined HTTP results and reproducible harness are in the companion CDA PR. Full database utPLSQL suite and production/RDS qualification remain outstanding.

  • AI tools used

Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
@krowvin

krowvin commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Closing this as it was submitted to provide some ideas and brainstorm

@krowvin krowvin closed this Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant