Lazy semantic region summaries

- claims cache the next region shard without rebuilding its key summary
- summaries are computed when a query or compaction reads them
This commit is contained in:
Brian Neumann-Fopiano committed 2026-09-28 13:43:38 -04:00
1 parent 08353e3bdd
commit 20e10999dd
2 files changed
+26 -1

No files matched your search

@@ -1075,7 +1075,11 @@ public final class GenerationSemanticIndex {
private void cacheRegion(long regionKey, RegionShard region) {
regions.put(regionKey, region);
cacheSummary(regionKey, region.summary());
if (region.summary == null) {
summaries.remove(regionKey);
} else {
cacheSummary(regionKey, region.summary);
}
while (regions.size() > MAXIMUM_CACHED_REGIONS) {
Iterator<Map.Entry<Long, RegionShard>> entries = regions.entrySet().iterator();
entries.next();