]> source.dussan.org Git - jgit.git/commit
DfsBlockCacheConfig: propagate hotmap configs to pack ext cache configs 73/1203673/3
authorLaura Hamelin <haowl@google.com>
Wed, 6 Nov 2024 21:41:30 +0000 (13:41 -0800)
committerLaura Hamelin <haowl@google.com>
Fri, 8 Nov 2024 17:14:15 +0000 (09:14 -0800)
commita7b5f056d8ff68a0df8968fdd10d3f7faa66d290
tree1faaf137fa04ca3ba42a3c996d7bf55ef5b0c212
parentb2accb0e9c07fa40fa9d7bf266a5763a1f63cc90
DfsBlockCacheConfig: propagate hotmap configs to pack ext cache configs

CacheHotMap is currently only set on the base DfsBlockCacheConfig and is
not propagated down to PackExt specific caches.

Because CacheHotMap is set from a method call rather than from Configs,
this change sets per-PackExt CacheHotMap configs on PackExt cache
configs both when DfsBlockCacheConfig#setCacheHotMap(...) is called, and
when DfsBlockCacheConfig#configure(...) is called after setCacheHotMap.

The outer DfsBlockCacheConfig keeps the full CacheHotMap for the same
reason that the CacheHotMap config is propagated in both setCacheHotMap
and configure: the order of operations setting the configuration from
Configs and calling setCacheHotMap is not guaranteed.

Change-Id: Id9dc32fedca99ecc83c9dc90c24d9616873a202e
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfigTest.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java