Open
Conversation
More Comments in BufferAndLoad Fix RandomReadCacheTest input failure
… for tests; make some ReadAtAddrss and Reviv tests [Explicit] temporarily. A couple Garnet test fixes for required minimum page count
Fix MultiDBManager not propagating SizeTracker start when adding a DB Fix SortedSetOps using wrong context Fix Recovery not propagating LastPageFreed Remove SizeTracker fields that duplicated LogSizeTracker Fix Recovery eviction-range calculations Disable some tests temporarily until they can be converted
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements major changes to CacheSizeTracker and LogSizeTracker to enable fine-grained HeadAddress movement (not constrained to page boundaries), combining inline log space and heap size limits into a unified memory target. The implementation automatically enables size tracking when memorySize is specified, and introduces the ability to specify pageCount independently. The PR also removes the EmptyPageCount property in favor of MaxAllocatedPageCount.
Changes:
- Renamed configuration properties from
MemorySize/HeapMemorySizetoLogMemorySizewith combined inline+heap tracking - Added
PageCountconfiguration option to allow specifying page count independent of memory size - Replaced
EmptyPageCountwithMaxAllocatedPageCount(nowHighWaterAllocatedPageCount) - Implemented fine-grained eviction that can clear individual records within pages
- Updated size tracking to use observer pattern and track both inline and heap memory together
Reviewed changes
Copilot reviewed 129 out of 130 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ServerOptions.cs | Renamed MemorySize to LogMemorySize, added PageCount, renamed IndexSize to IndexMemorySize |
| GarnetServerOptions.cs | Removed HeapMemorySize/ReadCacheHeapMemorySize, added ReadCachePageCount, updated logging |
| KVSettings.cs | Changed MemorySize to LogMemorySize, added PageCount, removed MinEmptyPageCount |
| LogSettings.cs | Updated to use MemorySize (long) instead of MemorySizeBits, added PageCount |
| CacheSizeTracker.cs | Removed LogSizeCalculator, updated to track combined inline+heap memory |
| TestUtils.cs | Updated test utilities to use new configuration names and pageCount parameter |
| Various test files | Updated memory size parameters and adjusted for new MinTargetPageCount requirements |
| Allocator implementations | Updated FreePage logic to check logSizeTracker instead of EmptyPageCount |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fix some issues (resulting from going to GC.AllocateArray) with reusing allocator pages. Replace the last NativeMemory allocations in Allocator with GC.AllocateArray.
Move FreePage() up to just below Alloc/ReturnPage() so they're together
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Major features:
There are a number of temporarily [Explicit] tests that still require work to modify from the previous implementation; that work is in progress.