mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-27 06:20:02 +00:00
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:
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();
|
||||
|
||||
Reference in new issue
Block a user