Skip to content

TKey and an interface for key bytes and namespaces#1605

Merged
kevin-montrose merged 9 commits into
tedhar/size-trackerfrom
tkeyNamespaceTake3
Mar 6, 2026
Merged

TKey and an interface for key bytes and namespaces#1605
kevin-montrose merged 9 commits into
tedhar/size-trackerfrom
tkeyNamespaceTake3

Conversation

@kevin-montrose

@kevin-montrose kevin-montrose commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Take 3 on TKey additions for Namespace against store v2.

  • Plumb TKey everywhere in Tsavorite
  • Tsavorite tests passing parity
  • Update Garnet to use FixedSpanByteKey
  • Garnet test passing parity
  • Update IKey to expose namespaces
  • Rebase against latest tedhar/size-tracker

@kevin-montrose kevin-montrose changed the title [DO NOT MERGE] [DO NOT MERGE] TKey and an interface for key bytes and namespaces Mar 5, 2026
@kevin-montrose kevin-montrose changed the title [DO NOT MERGE] TKey and an interface for key bytes and namespaces TKey and an interface for key bytes and namespaces Mar 5, 2026
@kevin-montrose kevin-montrose marked this pull request as ready for review March 5, 2026 17:49
In .NET 9+ IKey may be a ref struct.
IKeyComparer is now generic (on methods).
LogRecord and friends implement IKey.
ISourceLogRecord implements TKey.
Most are even passing.
ObjectIterationPushLockTest is flaky, but that is also true on tedhar/size-tracker .
Same thing with RevivificationSpanByteTests, fail in this branch but crash or flake in tedhar/size-tracker .

fix up more tests, restorign that weird input special casing
…for Vector Set keys, but does not introduce them
@kevin-montrose kevin-montrose merged commit 47356ba into tedhar/size-tracker Mar 6, 2026
1 check passed
@kevin-montrose kevin-montrose deleted the tkeyNamespaceTake3 branch March 6, 2026 17:02
badrishc pushed a commit that referenced this pull request Mar 10, 2026
* MInor cleanup

* Convert LogSizeTracker to be more fully LogRecord-ized
More Comments in BufferAndLoad
Fix RandomReadCacheTest input failure

* WIP changing to {MemorySize, PageSize, PageCount} where MemorySize includes Heap

* WIP: SizeTracker conversion

* WIP SizeTracker

* WIP on sizeTracker

* WIP SizeTracker

* WIP SizeTracker

* WIP SizeTracker - most tests pass

* WIP sizeTracker

* Tsavorite fixes for ReadOnlyAddress calculation, Recovery, some fixes for tests; make some ReadAtAddrss and Reviv tests [Explicit] temporarily. A couple Garnet test fixes for required minimum page count

* Fix StoreWrapper.RecoverCheckpoint() to ensure SizeTrackers are started
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

* format

* Finish AsyncFlushPagesForReadOnly. Still a little WIP for AsyncFlushPagesForSnapshot

* Finish size tracker.
Fix some issues (resulting from going to GC.AllocateArray) with reusing allocator pages.
Replace the last NativeMemory allocations in Allocator with GC.AllocateArray.

* Make a couple tests [Explicit] temporarily
Move FreePage() up to just below Alloc/ReturnPage() so they're together

* Move to OPMROWorker; more fixes in Recovery

* format

* Re-enable some tests, and disable a couple others temporarily. Make sure OA page header is set correctly for object log position.

* TKey and an interface for key bytes and namespaces (#1605)

* Rework Tsavorite so TKey is a parameter again, constained by IKey.
In .NET 9+ IKey may be a ref struct.
IKeyComparer is now generic (on methods).
LogRecord and friends implement IKey.
ISourceLogRecord implements TKey.

* Get Tsavorite tests compiling.
Most are even passing.
ObjectIterationPushLockTest is flaky, but that is also true on tedhar/size-tracker .
Same thing with RevivificationSpanByteTests, fail in this branch but crash or flake in tedhar/size-tracker .

fix up more tests, restorign that weird input special casing

* benchmarks compile; no attempt to actually run them, converting Garnet first

* update Garnet to use new interfaces; everything compiles, nothing is tested

* formatting

* add namespace bits to Tsavorite

* populate namespace in log records

* all Tsavorite tests passing again

* punch namespace setting and new comparer into Garnet; this has TODOs for Vector Set keys, but does not introduce them

* Fix OA page clearing, Recovery EvictionPageRange, async test keys

* format

* Turn off "disposed" check on GetPhysicalAddress (due to Cluster.test Dispose sequencing)

---------

Co-authored-by: kevin-montrose <kmontrose@microsoft.com>
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants