Skip to content

[JENKINS-35493] severe performance regression after SECURITY-243 #17236

Closed

Description

@jenkins-infra-bot

If you have a git changelog with lots of commits by different users and a non-local authentication scheme (basically anything other than the local database) then viewing that page now takes a lot longer as all the users in the commits need to be looked up in the security realm to see if they are valid authentication "users" or if it is just a "full name" that can be resolved from disk.

There needs to be a way for plugins to say get me a user not for authentication purposes that can if the user has been saved on disk will return that in preference to not hitting the security realm to see if the user does indeed exist.

setting hudson.model.User.SECURITY_243_FULL_DEFENSE=false helps but there should really be a separate API.

WIthout this extra API all security realms need to implement multiple caches (a not found cache as well as a regular cache)


Originally reported by teilo, imported from: severe performance regression after SECURITY-243
  • assignee: rsandell
  • status: Resolved
  • priority: Major
  • component(s): core
  • label(s): 2.7.3-fixed, performance, regression
  • resolution: Fixed
  • resolved: 2016-07-20T14:31:39+00:00
  • votes: 1
  • watchers: 5
  • imported: 2025-11-24
Raw content of original issue

If you have a git changelog with lots of commits by different users and a non-local authentication scheme (basically anything other than the local database) then viewing that page now takes a lot longer as all the users in the commits need to be looked up in the security realm to see if they are valid authentication "users" or if it is just a "full name" that can be resolved from disk.

There needs to be a way for plugins to say get me a user not for authentication purposes that can if the user has been saved on disk will return that in preference to not hitting the security realm to see if the user does indeed exist.

setting hudson.model.User.SECURITY_243_FULL_DEFENSE=false helps but there should really be a separate API.

WIthout this extra API all security realms need to implement multiple caches (a not found cache as well as a regular cache)

Activity

  1. jenkins-infra-bot commented on Jun 9, 2016

    @jenkins-infra-bot
    Author
  2. jenkins-infra-bot commented on Jun 9, 2016

    @jenkins-infra-bot
    Author
    svanoort:
    • Original comment link
    • Raw content of original comment:

      It may be worth considering adding an API for raw author/committer Strings in changesets (similar to getAuthorName() in the GitChangeSet implementation) which does not require full user lookup (useful for cases like this).

    It may be worth considering adding an API for raw author/committer Strings in changesets (similar to getAuthorName() in the GitChangeSet implementation) which does not require full user lookup (useful for cases like this).

  3. jenkins-infra-bot commented on Jul 7, 2016

    @jenkins-infra-bot
    Author
    rsandell:

    For this particular slowness we could perhaps just add a chache to the affected area https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/User.java#L1058 so that we can get it in an earlier LTS and then expose an API at a later date.

  4. jenkins-infra-bot commented on Jul 20, 2016

    @jenkins-infra-bot
    Author
    swashbuck1r:
    • Original comment link
    • Raw content of original comment:

      Daniel says resolvable since it is merged and the bot is broken.

    Daniel says resolvable since it is merged and the bot is broken.

  5. jenkins-infra-bot commented on Aug 8, 2016

    @jenkins-infra-bot
    Author
    olivergondza:
    • Original comment link
    • Raw content of original comment:

      rsandell, I am leaning towards not including this into 2.7.3 due to the complexity of the fix. Do you or somebody else feel strongly?

    rsandell, I am leaning towards not including this into 2.7.3 due to the complexity of the fix. Do you or somebody else feel strongly?

  6. jenkins-infra-bot commented on Aug 8, 2016

    @jenkins-infra-bot
    Author
    svanoort:
    • Original comment link
    • Raw content of original comment:

      olivergondza It's a rather significant problem for anything interacting with SCM changesets, since the changeset APIs resolve users to Jenkins users – in many cases with slower remote security realms, performance without a cache can be bad enough that it will lock up a Jenkins master almost completely.

      On those grounds it would be a very strong candidate for inclusion.

      CC teilo and jglick to add to the above, since they've also dealth first-hand with problems from the SECURITY-243 fix without caches.

    olivergondza It's a rather significant problem for anything interacting with SCM changesets, since the changeset APIs resolve users to Jenkins users – in many cases with slower remote security realms, performance without a cache can be bad enough that it will lock up a Jenkins master almost completely.

    On those grounds it would be a very strong candidate for inclusion.

    CC teilo and jglick to add to the above, since they've also dealth first-hand with problems from the SECURITY-243 fix without caches.

  7. removed
    bugFor changelog: Minor bug. Will be listed after features
    on Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions