Be more careful with synchronization in RepositoryCache
commitf2f401ef7db85598d4bd3517fcf71dcf33117ac5
authorThomas Wolf <thomas.wolf@paranor.ch>
Sun, 13 Nov 2016 16:17:27 +0000 (13 17:17 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 24 Nov 2016 23:51:18 +0000 (25 00:51 +0100)
treef096b7b7327d4e7d05792870bc2b04f727b2f144
parentc60b10439231f10acdfdb1ebbf1e12a23496281e
Be more careful with synchronization in RepositoryCache

Ensure that EGit doesn't use nested locking of the RepositoryCache and
the IndexDiffCache. Otherwise deadlocks can occur between a new
IndexDiffCacheEntry being created and pruning or clearing the
RepositoryCache (lock inversion).

Also ensure that stopping the bundle shuts down in the inverse order
things were started. Stop listeners and cancel and wait for jobs before
shutting down global caches, then shut down down the caches in the
inverse order they were started.

Bug: 507359
Change-Id: If5fafdbbb88e4421eb4ea15380542d5c03ca248e
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.core/src/org/eclipse/egit/core/Activator.java
org.eclipse.egit.core/src/org/eclipse/egit/core/RepositoryCache.java