id summary reporter owner description type status priority milestone component version severity resolution keywords cc branch changelog apichanges internalchanges 11164 Git persistent cache not refreshed on changeset added notification from another process James Teh Jun Omae "With git persistent_cache enabled and repository sync_per_request empty, the persistent cache isn't refreshed after a changeset added notification is dispatched from another process. This is problematic because changeset added notifications are normally dispatched from a Git post-receive hook, which is obviously in a different process to the process(es) running Trac. Str: 1. Configure a Git repository, set repository sync_per_request to empty, enable git persistent_cache and disable git cached_repository. 2. Start an instance of tracd. 3. Open the Trac revision log. * Result (correct): The latest revision is displayed at the top. 4. Commit something to the Git repository. 5. Open the Trac revision log. * Expected: The latest revision should be displayed at the top. * Actual: The revision displayed at the top is the same as in step 3. Unless I'm missing something, this makes (unfortunate) sense looking at the code. Calling sync() on the repository (and thus the underlying PyGIT.Storage) would refresh the cache, but it has no way of knowing that sync() was called from another process in response to a changeset added notification. This gets even more interesting if you enable git cached_repository. In that case, !GitCachedRepository knows about the new revision - even invalidation of the cached metadata is handled correctly cross-process via the cache db table - but it runs into trouble when it gets to the underlying PyGIT.Storage instance. I guess one way to solve this is to make !GitRepository use a cached property somewhere so it knows when to resync the underlying PyGIT.Storage instance. I'm not quite sure on specifics, though. :)" defect closed normal 1.0.2 plugin/git 1.0.1 normal fixed Peter Suter Jun Omae Fix be not refreshing Git repository with persistent cache if it has been changed.