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

getAll/Complete cache: BaseMessage (also creates caches on demand)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.9.3, 10.0
    • Fix Version/s: 10.0
    • Component/s: Messages Tool
    • Labels:
      None
    • 10 status:
      Resolved

      Description

      See KNL-1223
      Need to remove the use of complete/getAll caching

      m_channelCache BaseMessage.getChannels() - Return a list of all the defined channels
      m_messageCaches (see below) BaseMessage.findMessages() - find messages in a channel

      We may be able to remove the getChannels() method entirely. It is used by:
      List<String> getChannelIds(String context)
      Which essentially throws away most of the data anyway. It would be better to cache this data directly instead.

      m_messageCaches is actually a hash of caches which are created on demand for each unique channel_id (see code below). This would make distributing this cache impossible and also seems like it could start to overwhelm the system with a massive number of caches.

      --------
      // find the message cache
      Cache msgCache = (Cache) m_messageCaches.get(getReference());
      if (msgCache == null)
      {
      synchronized (m_messageCaches)
      {
      // check again
      msgCache = (Cache) m_messageCaches.get(getReference());

      // if still not there, make one
      if (msgCache == null)

      { msgCache = m_memoryService.newCache( "org.sakaiproject.message.api.MessageService.msgCache", service(), messageReference(m_context, m_id, "")); m_messageCaches.put(getReference(), msgCache); }

      }
      }

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  aaronz Aaron Zeckoski (Inactive)
                  Reporter:
                  aaronz Aaron Zeckoski (Inactive)
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration