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

Presence polling db performance improvement

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 19.6 [Tentative], 20.2 [Tentative], 21.0 [Tentative], 22.0 [Tentative]
    • Fix Version/s: 22.0 [Tentative]
    • Component/s: Presence
    • Labels:
    • 21 Status:
      Please Merge
    • 20 status:
      Please Merge
    • 19 status:
      Please Merge
    • Test Plan:
      Hide
      1. Create a site with some users it matters not the roles
      2. Login and access the SIte using different browsers for at least 2 users
      3. In the browsers click the Presence tool and view the names are correct
      4. Have one user Logout and notice that the presence is updated in the other users still logged in (note it may take up to 10 seconds for the other browsers to update, this is normal)
      Show
      Create a site with some users it matters not the roles Login and access the SIte using different browsers for at least 2 users In the browsers click the Presence tool and view the names are correct Have one user Logout and notice that the presence is updated in the other users still logged in (note it may take up to 10 seconds for the other browsers to update, this is normal)

      Description

      Presence polling causes 2 queries per every poll.

      1. org.sakaiproject.component.privacy.PrivacyManagerImpl#getPrivacyByContextAndTypeAndUserIds

      select privacyrec0_.id as id1_141_, privacyrec0_.contextId as contextI2_141_, privacyrec0_.lockId as lockId3_141_, privacyrec0_.recordType as recordTy4_141_, privacyrec0_.userId as userId5_141_, privacyrec0_.viewable as viewable6_141_ from SAKAI_PRIVACY_RECORD privacyrec0_ where privacyrec0_.contextId=? and privacyrec0_.recordType=? and (privacyrec0_.userId in (?))

      2. And one that selects the PrivacyRecord from the results above

       

      These can be eliminated by adding the query (1) to the query results cache and turning on 2nd level caching for the PrivacyRecord.

       

       

       

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                ern Earle R Nietzel
                Reporter:
                ern Earle R Nietzel
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration