]> source.dussan.org Git - jgit.git/commit
PackExtBlockCacheTable: spread extensions over multiple dfs tables 64/1196164/25
authorLaura Hamelin <haowl@google.com>
Fri, 7 Jun 2024 23:11:21 +0000 (16:11 -0700)
committerLaura Hamelin <haowl@google.com>
Wed, 24 Jul 2024 20:37:11 +0000 (13:37 -0700)
commita2a5cdddd78a1e066aed7caf86ba9510450710c9
tree5a7d06929d2300cedc36f64bc5dd47e2c4366283
parent89e2a980b9fcd1b575c1290cc728e9a3240e6c9a
PackExtBlockCacheTable: spread extensions over multiple dfs tables

The existing DfsBlockCache uses a single table for all
extensions (idx, ridx, ...).

This change introduces an implementation of the table
interface that can keep extensions in different cache
tables.
This selects the appropriate cache to use for a specific
PackExt or DfsStreamKey's PackExt type, allowing the
separation of entries from different pack types to help
limit churn in cache caused by entries of differing sizes.

This is especially useful in fine-tuning caches and
influencing interactions by extension type.
For example, a table holding INDEX types only will
not influence evictions of other PackExt types and
vice versa.

The PackExtBlockCacheTable allowing setting the
underlying DfsBlockCacheTables and mappinh directly,
letting users implement and use custom DfsBlockCacheTables.

Change-Id: Icee7b644ef6b600aa473d35645469d6aa1bce345
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/PackExtBlockCacheTableTest.java [new file with mode: 0644]
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/PackExtBlockCacheTable.java [new file with mode: 0644]