From 2f674e79d42e7d36225fa9ac7ecefbc5bc62d325 Mon Sep 17 00:00:00 2001 From: vnugent Date: Thu, 13 Jul 2023 13:20:25 -0400 Subject: Checkpoint, kind of working clustering --- lib/VNLib.Data.Caching.ObjectCache/src/BlobCache.cs | 4 ++-- lib/VNLib.Data.Caching.ObjectCache/src/CacheEntry.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/VNLib.Data.Caching.ObjectCache') diff --git a/lib/VNLib.Data.Caching.ObjectCache/src/BlobCache.cs b/lib/VNLib.Data.Caching.ObjectCache/src/BlobCache.cs index f77587b..5e28dde 100644 --- a/lib/VNLib.Data.Caching.ObjectCache/src/BlobCache.cs +++ b/lib/VNLib.Data.Caching.ObjectCache/src/BlobCache.cs @@ -187,9 +187,9 @@ namespace VNLib.Data.Caching.ObjectCache { //remove the entry and bypass the disposal bool result = base.Remove(objectId); -#if DEBUG + Debug.Assert(result == true); -#endif + return true; } diff --git a/lib/VNLib.Data.Caching.ObjectCache/src/CacheEntry.cs b/lib/VNLib.Data.Caching.ObjectCache/src/CacheEntry.cs index a02605e..f650cc3 100644 --- a/lib/VNLib.Data.Caching.ObjectCache/src/CacheEntry.cs +++ b/lib/VNLib.Data.Caching.ObjectCache/src/CacheEntry.cs @@ -24,6 +24,7 @@ using System; using System.Buffers; +using System.Diagnostics; using System.Buffers.Binary; using System.Runtime.CompilerServices; @@ -204,10 +205,9 @@ namespace VNLib.Data.Caching //Get the data segment Span segment = GetDataSegment(); -#if DEBUG //Test segment length is equivalent to the requested data length - System.Diagnostics.Debug.Assert(segment.Length == data.Length); -#endif + Debug.Assert(segment.Length == data.Length); + //Copy data segment data.CopyTo(segment); } -- cgit