Skip to content

Nojira/time core session - #582

Draft
mikejritter wants to merge 5 commits into
collectionspace:developfrom
mikejritter:nojira/time-core-session
Draft

mikejritter wants to merge 5 commits into
collectionspace:developfrom
mikejritter:nojira/time-core-session

Conversation

@mikejritter

@mikejritter mikejritter commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

What does this do?
Adds logging for total time elapsed when using a CoreSession

Why are we doing this? (with JIRA link)
No jira. This is an idea I had to try and track which sessions are being held on to longer than the default timeout.

It would be good to discuss the default value. Initially I was thinking of using 1 second, but when thinking further it seemed like maybe 250ms is a good starting point. My only concern would be that is too short and we might see many sessions being used for that long.

Also, at the moment you need to correlate the log with the http thread its being executed on. This could be extended to include the query, or some other bookkeeping to make it easier, however I wanted to keep this fairly simple for now (and some of the housekeeping has already made the PR larger than it needs to be).

How should this be tested? Do these changes have associated tests?

  • Rebuild and start collectionspace
  • Query against an endpoint, ideally with a large number of records
    • If you have a small instance, it's possible to connect with a debugger and set a breakpoint after the CoreSession is created (e.g. in NuxeoRepositoryClientImpl#getFiltered after getRepositorySession(ctx))
  • See the log show up in catalina.out or cspace-services.log

Dependencies for merging? Releasing to production?
No dependencies.

Has the application documentation been updated for these changes?
n/a

Did someone actually run this code to verify it works?
@mikejritter ran locally

Have any new security vulnerabilities been handled?
n/a

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