Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TKey and an interface for key bytes and namespaces#1582

Draft
kevin-montrose wants to merge 6 commits intotedhar/size-trackerfrom
storev2-tkeyNamespace
Draft

TKey and an interface for key bytes and namespaces#1582
kevin-montrose wants to merge 6 commits intotedhar/size-trackerfrom
storev2-tkeyNamespace

Conversation

@kevin-montrose
Copy link
Contributor

@kevin-montrose kevin-montrose commented Feb 27, 2026

  • Plumb TKey everywhere
  • .NET 10 and .NET 8 implementations
  • Test passing parity(?)
  • Add namespaces to IKey, wire up TSourceLogRecord accordingly
  • Tests with actually setting namespaces

///
/// TODO: We could maybe obviate this with a set of extension methods on Tsavorite context?
/// </summary>
public static explicit operator SpanByteKey(ReadOnlySpan<byte> key) => new(key);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would be correct only if we were told that the given ReadOnlySpan key is already pinned by caller.

/// <summary>
/// Create a new SpanByteKey wrapping the given bytes.
/// </summary>
private SpanByteKey(ReadOnlySpan<byte> key)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename to pinnedKey to make it clear it needs to be pinned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants