Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-9887

Excessive db queries for dropbox on site update actions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4.0, 2.4.1
    • Fix Version/s: 2.4.x, 2.5.0
    • Component/s: Drop box
    • Labels:
      None

      Description

      The code in createDropboxCollection() in BaseContentService.java iterates through every user in the site to attempt to create a dropbox if the user doesn't exist.

      Thus for every site save operation (e.g. update site properties, add users, etc.), a sql query is generated like:

      select XML from CONTENT_COLLECTION where ( COLLECTION_ID = '/group-user/siteid/userid/')

      This is a scaleability issue for large sites and generates unnecessary db traffic and app server overhead (even for smaller sites).

      The entire collection of dropboxes for the site should be read in with one query, viz.

      select XML from CONTENT_COLLECTION where IN_COLLECTION = '/group-user/siteid/'

      and only additions, deletions or updates written to the db.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  Unassigned Unassigned
                  Reporter:
                  smarquard Stephen Marquard
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration