Merge "Fix inProcessPackedRefsLock not shared with copies of the instance"
This commit is contained in:
commit
74fa245b3c
|
@ -155,7 +155,7 @@ public class RefDirectory extends RefDatabase {
|
||||||
* {@code RepositoryCache} is used, this lock instance will be used by all
|
* {@code RepositoryCache} is used, this lock instance will be used by all
|
||||||
* threads.
|
* threads.
|
||||||
*/
|
*/
|
||||||
final ReentrantLock inProcessPackedRefsLock = new ReentrantLock(true);
|
final ReentrantLock inProcessPackedRefsLock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of modifications made to this database.
|
* Number of modifications made to this database.
|
||||||
|
@ -190,6 +190,7 @@ public class RefDirectory extends RefDatabase {
|
||||||
packedRefs.set(refDb.packedRefs.get());
|
packedRefs.set(refDb.packedRefs.get());
|
||||||
trustFolderStat = refDb.trustFolderStat;
|
trustFolderStat = refDb.trustFolderStat;
|
||||||
trustPackedRefsStat = refDb.trustPackedRefsStat;
|
trustPackedRefsStat = refDb.trustPackedRefsStat;
|
||||||
|
inProcessPackedRefsLock = refDb.inProcessPackedRefsLock;
|
||||||
}
|
}
|
||||||
|
|
||||||
RefDirectory(FileRepository db) {
|
RefDirectory(FileRepository db) {
|
||||||
|
@ -210,6 +211,7 @@ public class RefDirectory extends RefDatabase {
|
||||||
.getEnum(ConfigConstants.CONFIG_CORE_SECTION, null,
|
.getEnum(ConfigConstants.CONFIG_CORE_SECTION, null,
|
||||||
ConfigConstants.CONFIG_KEY_TRUST_PACKED_REFS_STAT,
|
ConfigConstants.CONFIG_KEY_TRUST_PACKED_REFS_STAT,
|
||||||
TrustPackedRefsStat.UNSET);
|
TrustPackedRefsStat.UNSET);
|
||||||
|
inProcessPackedRefsLock = new ReentrantLock(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Repository getRepository() {
|
Repository getRepository() {
|
||||||
|
|
Loading…
Reference in New Issue