Duplicates data in sonia.cache.cmd.log

Issue #373 resolved
created an issue

Hi Sebastian,

Since 1.30, cache limits works so i no more run out of memory. So, i have set this issue as minor.

I have logged 7 times with a different account and w/ scm-activity-plugin enabled. As i have to wait, it seems that changes sets are reread from disk each time. So, i have dumped memory and done a quick analyse (pls see here-attached a snapshot).

The structure com.google.common.cache.LocalCache$StrongAccessEntry contains exactly the same ChangeSet lists and is duplicated 7 times (exactly the number of different logins). The sonia.scm.repository.api.logCommandBuilder$CacheKey differs only by its request field, but not by changesetId or repositoryId. As CacheKey differs, the cache container com.google.common.cache.LocalCache$StrongAccessEntry might be also duplicated with lots of changesets inside.

Could you have a look, pls ? Thank you

BR Jérôme

Comments (7)

  1. Sebastian Sdorra repo owner
    • changed status to open

    SCM-Manager reads the changests again from disk, because the maximum size limit is reached. The default maximum for log cache is 500 and this too low for your setup. You can override the settings for the log cache by creating a file at .scm/ext/gcache.xml with the following content:

    <?xml version="1.0" encoding="UTF-8"?>

    It is very complicated to avoid such duplicate cache entries.

  2. jedevivie reporter

    --=alternative 002CE1F0C1257B4E= Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1

    Hi Sebastian,

    I have set limit to 10000 objects in cmd.log cache and do not exceed it dur= ing my test.=20 Even w/o reaching this limit, changeset are duplicated in memory

    BR J=E9r=F4me

  3. Sebastian Sdorra repo owner

    Hi, sorry for the long delay. But i've started to implement a new caching strategy for the activity plugin. With this new caching strategy i will no longer use the default cache for git repositories. Instead of the default cache i will use a new cache which caches only the 20 newest changeset of all branches instead of 20 changesets of every branch. This change should drastically reduce the memory overhead in large environments with many branches. This changes require a small change to the core of scm-manager, so the new version of the activity plugin will be only available for version 1.32 or newer of scm-manager.


  4. Log in to comment