Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-7689

Performance issue with KRIM Document Qualified Roles

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.1
    • Component/s: Development, Performance
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-10306person document has a display issue if a role has more than 19 role qualifiers
      KULRICE-9165Person document not displaying role qualifiers
      KULRICE-12836Role qualifiers lost on role maintenance document
      KULRICE-3679Improve the performance of qualified role matching in KIM
      KULRICE-3989UIDocumentService.loadRoleMemberQualifiers - is there a way to load qualifiers not associated with the role type
      KULRICE-7443Role document blows on the KRIM_ROLE_RSP_ACTN_TC1 constraint
      KULRICE-3553Add desc_text column to krim_role_document_t
      KULRICE-6565Fix qualifiers on role for Person and Role Documents
      KULRICE-4613Cannot return a derived role as an assignee in the Role Document
      KULRICE-4178Some role qualifiers displaying incorrectly
    • Rice Module:
      KIM
    • Application Requirement:
      KC
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      While testing KC 5.0 with migrated data from Coeus at MIT we found that there is a major performance issue while leading each page. Here are the details what we found so far...

      In our database, KRIM_ROLE_MEMBER_T has 144940 records.
      When a role loads from the database, its populating all its role members as part of that Role BO. Unlike Coeus, KC uses the KRIM_ROLE_MBR_T table to store all kinds of User Roles, which includes all entity level (Proposal level, Protocol level,etc) roles as well. Because of this reason, KRIM_ROLE_MBR_T has around 144940 records in the database after the migration and so loading RoleMember list along with RoleBO might need to be avoided.

      For e.g.: While loading Proposal Viewer Role for sdowdy, it ends up populating all the members who has Proposal Viewer Role assigned to every proposal in the system.

      Here are some sample data from my test case...

      Method name : org.kuali.rice.kim.impl.role.RoleServiceBase.getRoleBo(String roleId). This method is mainly calling from RoleServiceImpl.isActive(roleId) which doesn't require any RoleMember details.

      Role Id Execution Time
      -------------------------------------- ---------------------------------------------------------------------------
      111 9s
      108 27s
      107 (Proposal Viewer) 8m 53s (Role Members size=27664)
      110 (Proposal Aggregator 5m 20s (Role Members size=16705)

      Since its kind of blocker for testing Coeus data migration script, i am setting it as major.

        Issue Links

          Activity

          Hide
          Chris Denne added a comment -

          Eric mentioned that IU contributed a fix back to KR2.1.1 for this specific issue and user should see a marked performance improvement in 2.1.1. Can we perform a rest with this MIT data with 2.1.1?

          Also, other performance issues related to getting Role members wholesale for a RoleID with a large membership could be improved by providing an overrid for the RoleTypeService.getQualifiersForExactMatch() in the specific RoleTypeService implementation.

          Show
          Chris Denne added a comment - Eric mentioned that IU contributed a fix back to KR2.1.1 for this specific issue and user should see a marked performance improvement in 2.1.1. Can we perform a rest with this MIT data with 2.1.1? Also, other performance issues related to getting Role members wholesale for a RoleID with a large membership could be improved by providing an overrid for the RoleTypeService.getQualifiersForExactMatch() in the specific RoleTypeService implementation.
          Hide
          Geo Thomas (Inactive) added a comment -

          hi Chris,
          i was trying to find a way to port KR 2.1.1 jar back to KC 5.0. Do you know if we could do it? if yes, how?

          Show
          Geo Thomas (Inactive) added a comment - hi Chris, i was trying to find a way to port KR 2.1.1 jar back to KC 5.0. Do you know if we could do it? if yes, how?
          Hide
          Chris Denne added a comment -

          I think we'd need to update the POM dependency and rebuild the war. Are you building locally or pulling the binary download? I thought the latter.

          Show
          Chris Denne added a comment - I think we'd need to update the POM dependency and rebuild the war. Are you building locally or pulling the binary download? I thought the latter.
          Hide
          Geo Thomas (Inactive) added a comment - - edited

          we are using the binary download. I will get the POM changed to 5.0 version and build the war file locally. Do you know if there is any db changes specific to KR 2.1.1?

          Show
          Geo Thomas (Inactive) added a comment - - edited we are using the binary download. I will get the POM changed to 5.0 version and build the war file locally. Do you know if there is any db changes specific to KR 2.1.1?
          Hide
          James Bennett added a comment -

          I just added one performance improvement we found for KC at IU. The findRoles method on the role service was fetching all of the membership information for all of the roles it found which added a lot of unnecessary overhead. I contributed the change we made at IU to the rice-2.1-kc branch. At IU the KC team found that this improved performance on at least one permission check from taking 3.5+ minutes to just seconds.

          Show
          James Bennett added a comment - I just added one performance improvement we found for KC at IU. The findRoles method on the role service was fetching all of the membership information for all of the roles it found which added a lot of unnecessary overhead. I contributed the change we made at IU to the rice-2.1-kc branch. At IU the KC team found that this improved performance on at least one permission check from taking 3.5+ minutes to just seconds.
          Hide
          Peter Giles (Inactive) added a comment -

          Since the Rice team isn't doing any work on this at present, I'm going to resolve the issue. Geo, if you find that the IU changes aren't helping with the issue at MIT, please re-open. Thanks!

          Show
          Peter Giles (Inactive) added a comment - Since the Rice team isn't doing any work on this at present, I'm going to resolve the issue. Geo, if you find that the IU changes aren't helping with the issue at MIT, please re-open. Thanks!
          Hide
          Jessica Coltrin (Inactive) added a comment -

          release notes are generated. closing issues.

          Show
          Jessica Coltrin (Inactive) added a comment - release notes are generated. closing issues.

            People

            • Assignee:
              Peter Giles (Inactive)
              Reporter:
              Geo Thomas (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 week
                1w
                Remaining:
                Remaining Estimate - 1 week
                1w
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Structure Helper Panel