Skip to content

LDEV-6290 refactor scope logging levels#2780

Open
zspitzer wants to merge 1 commit intolucee:6.2from
zspitzer:LDEV-6290
Open

LDEV-6290 refactor scope logging levels#2780
zspitzer wants to merge 1 commit intolucee:6.2from
zspitzer:LDEV-6290

Conversation

@zspitzer
Copy link
Copy Markdown
Member

https://luceeserver.atlassian.net/browse/LDEV-6290

Summary

Adds the diagnostics needed to actually see when Lucee silently overwrites a live JSession (the bug behind the "intermittent logout" reports going back years). Previously the overwrite happened via a quiet Map.put plus an INFO log that read "use existing JSession" even when one had just been created.

Changes in ScopeContext.java:

  • createNewJSession now classifies the prior entry: DEBUG when none, INFO with lastAccess + expired when replacing a prior JSession, WARN when replacing a non-JSession. Includes httpSessionId, httpSessionAge, maxInactiveInterval for correlation.
  • New INFO at the LDEV-2973 trigger site reporting the Lucee-vs-Tomcat clock gap that drove the replacement.
  • New DEBUG on invalidateUserScope showing sessionType + migrate.
  • New trace() helper for per-request lifecycle.
  • Fixed the misleading "use existing JSession" log so it only fires on the existing-scope path, not after createNewJSession.
  • Scope-expiry summary INFO from the periodic Controler tick: Scope expiry: ended N session(s), N client(s); moved to backing storage N session(s), N client(s) (only when non-zero).

Storage subsystem (IKHandlerCache, IKHandlerDatasource, StorageScopeCookie/File/Memory, db/Ansi92) — demoted noisy per-request INFO lines to DEBUG to make the new INFOs visible at default log levels.

Test plan

  • Full repro suite in D:/testbeds/jee-session-timeout (10 repros, fresh instance)
  • H1 fires once for the LDEV-2973 trigger (gap=3ms recorded)
  • H3 fires 7x across suite — 6x expired=false (Railo trigger), 1x expired=true (LDEV-2973)
  • Scope-expiry summary fires from periodic Controler tick (every-minute and doit ticks)
  • No new errors / exceptions in exception.log

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