]> source.dussan.org Git - jgit.git/commit
DFS block cache: fix lock issue and support parallel index loading 55/186455/5
authorAlina Djamankulova <adjama@google.com>
Wed, 13 Oct 2021 20:16:41 +0000 (13:16 -0700)
committerAlina Djamankulova <adjama@google.com>
Tue, 19 Oct 2021 22:01:59 +0000 (15:01 -0700)
commit3b960ae72daa76d0d8f85c8a0d74575af0c48b24
tree2bc216f9f436b14060bca0276db748ccdd4d066b
parentc0436a3a0ab197b4e9639c0f2d94a386dc91d12a
DFS block cache: fix lock issue and support parallel index loading

This change is a fix to http://git.eclipse.org/r/c/jgit/jgit/+/183562
that was reverted in http://git.eclipse.org/r/c/jgit/jgit/+/184978
due to deadlocks. Separate locks in DfsBlockFile are removed to rely
on getting value from DfsBlockCache with region locking in place.

With this change bitmap index creation is not blocked on index and
reverse index full initialization in DfsPackFile. Now bitmap index
and index could be read from storage in parallel in separate threads.

A unit test is added for parallel index loading.

Signed-off-by: Alina Djamankulova <adjama@google.com>
Change-Id: Ic6d9c5a4a254628636aa98a5008447a27a003f69
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheTest.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java