Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
0ca8493
Refactors prior to storage-v2:
TedHartMS Nov 26, 2024
421d7a0
WIP; first cut at LogRecord etc. implementations
TedHartMS Dec 9, 2024
7542d8a
WIP: more LogRecord
TedHartMS Dec 10, 2024
0797412
More *LogRecord, and DiskRecord
TedHartMS Dec 11, 2024
f94a769
WIP: Convert allocators to new LogRecord and DiskRecord
TedHartMS Dec 20, 2024
53f4941
WIP: incorporate LogRecord into ISessionFunctions
TedHartMS Dec 24, 2024
ca4b399
More logRecord WIP
TedHartMS Dec 26, 2024
3b754e6
More WIP on MainSessionFunctions RMWMethods (and PrivateMethods) with…
TedHartMS Dec 28, 2024
49e9769
WIP LogRecord (MainStore RMWMethods)
TedHartMS Dec 30, 2024
a92c2bb
WIP: Consolidate to a single LogRecord; convert InternalRMW
TedHartMS Jan 5, 2025
1ce5ee6
TKey removal
TedHartMS Jan 7, 2025
95205ce
A few more TKey removals
TedHartMS Jan 7, 2025
493302d
WIP more logRecord
TedHartMS Jan 8, 2025
a470009
Remove pendingConterxt.recordInfo as it is no longer in RecordMetadata
TedHartMS Jan 9, 2025
60cba5a
WIP; Internal(RUMD) converted.
TedHartMS Jan 10, 2025
0c587fc
added PendingContext implementation of ISourceLogRecord
TedHartMS Jan 11, 2025
81bd194
Finish ContinuePending
TedHartMS Jan 12, 2025
1de5c11
Iterator changes - consolidate to RecordScanIterator
TedHartMS Jan 15, 2025
cf491bc
Mostly IO work
TedHartMS Jan 16, 2025
5d925ff
WIP: Reintroduce TValue through ObjectAllocator, LogRecord, etc.
TedHartMS Jan 16, 2025
06464cb
WIP Convert Garnet to LogRecord and ObjectAllocator (MainStoreFunctio…
TedHartMS Jan 17, 2025
340c1a7
TedHartMS Jan 18, 2025
2063e47
WIP converting Garnet to non-ref SpanByte-only keys
TedHartMS Jan 20, 2025
7e44fa7
More WIP on Garnet migration to LogRecord
TedHartMS Jan 20, 2025
d2d32c5
WIP Tsavorite LogRecord odds and ends
TedHartMS Jan 21, 2025
5f0639d
Rename TsavoriteLog to TsavoriteAof
TedHartMS Jan 22, 2025
575fd02
More processing-layer LogRecord etc. fixes
TedHartMS Jan 23, 2025
1f878ab
fix iterator as ISourceLogRecord
TedHartMS Jan 23, 2025
785cc31
More Expiration etc. cleanup in processing layer
TedHartMS Jan 23, 2025
42dd7ab
WIP BlockAllocate work
TedHartMS Jan 23, 2025
3b000cc
FInalize removal of SpanByte.Metadata
TedHartMS Jan 23, 2025
850de54
More param fixes in processing layer
TedHartMS Jan 23, 2025
4a85072
SpanField and OptionalFieldsShift structs
TedHartMS Jan 27, 2025
4eb8283
Propagate some SpanField etc. changes
TedHartMS Jan 27, 2025
7c8bc4d
First pass at LogRecord-based Revivification
TedHartMS Jan 28, 2025
f5a0e88
Finish OverflowAllocator
TedHartMS Jan 30, 2025
4eceed2
OK now I finished this iteration of OverflowAllocator
TedHartMS Jan 30, 2025
d6512a0
improve callers' use of OverflowAllocator
TedHartMS Jan 30, 2025
66e7ccd
More LogRecord-related cleanup
TedHartMS Jan 30, 2025
f4814a7
// TODOMigrate: temporarily clear errors related to Expiration in Key…
TedHartMS Jan 30, 2025
3e925ea
Fixes for first test runs
TedHartMS Jan 31, 2025
405a1ca
More fixes for CopyRecord and setting of Expiration etc
TedHartMS Jan 31, 2025
1ec5002
Cleanup OversizeAllocator.BlockHeader and usage
TedHartMS Feb 2, 2025
4a1ba56
SpanField and LogRecord documentation and cleanup; BlockHeader GetUse…
TedHartMS Feb 3, 2025
bc79840
More improvements to overflow allocator and usage
TedHartMS Feb 4, 2025
4747f95
More fixes for tests
TedHartMS Feb 4, 2025
fe870f4
Remove unneeded IAllocator(Callbacks) methods (superseded by LogRecord)
TedHartMS Feb 4, 2025
f002cf0
more overflow allocator fixes
TedHartMS Feb 5, 2025
ae51071
sizeInfo on ISessionFunctions and TrySetValueSpanLength improvements
TedHartMS Feb 7, 2025
e071de9
Remove SpanByte serialized usage (but leave an assert on .Serialized …
TedHartMS Feb 9, 2025
3799c67
Improved FreeList handling and ObjectIdMap growth/FreeList via Simple…
TedHartMS Feb 10, 2025
eb74f3c
Make sure DiskLogRecord Value and Record lengths are long
TedHartMS Feb 11, 2025
e734266
Remove ISerializer (not used and not planned to be)
TedHartMS Feb 11, 2025
417a2be
TIghten up SpanByte !IsSerialized assert and fix SETEX "expiration se…
TedHartMS Feb 11, 2025
6b6309f
Some TODO cleanup
TedHartMS Feb 11, 2025
bb3ca9d
Begin converting Tsavorite tests and benchmarks to LogRecord
TedHartMS Feb 14, 2025
e01c049
Tsavorite RevivificationTests and ObjectTests
TedHartMS Feb 16, 2025
ad3937a
More ObjectIdMap and OverflowAllocator work and tests
TedHartMS Feb 21, 2025
b6bfdcf
More overflowAllocator work: FixedSizePages and other fixes for YCSB,…
TedHartMS Feb 24, 2025
2f7533e
Clean up Locking.md (had some referenced to obsolete locking modes); …
TedHartMS Feb 26, 2025
792ad09
support for "inline struct" as SpanByte for Object value optimization
TedHartMS Feb 28, 2025
dae8537
finish "inline struct" testing; update processing layer to Tsavorite …
TedHartMS Mar 3, 2025
36b5f23
Convert RecordFieldInfo Key/Value TotalSize to DataSize - caller shou…
TedHartMS Mar 4, 2025
ecc0ec6
Merge 'main'
TedHartMS Mar 6, 2025
133000e
WIP main merge;
TedHartMS Mar 10, 2025
9f14510
Fixes from merging main
TedHartMS Mar 11, 2025
d84f749
More testing and fixes
TedHartMS Mar 11, 2025
1691e21
More merge fixes
TedHartMS Mar 12, 2025
98c6e6d
fix more tests
TedHartMS Mar 13, 2025
e2ef22f
merge 'main'
TedHartMS Mar 14, 2025
87f0471
Merge remote-tracking branch 'origin/main' into tedhar/storage-v2
TedHartMS Mar 14, 2025
a8c83b0
merge 'main'
TedHartMS Mar 14, 2025
7a29282
Merge remote-tracking branch 'origin/main' into tedhar/storage-v2
TedHartMS Mar 14, 2025
7994e1f
Merge remote-tracking branch 'origin/tedhar/storage-v2' into tedhar/o…
TedHartMS Mar 14, 2025
3dfef24
minor comment cleanup
TedHartMS Mar 14, 2025
d932171
some doc-related updates, mostly comments
TedHartMS Mar 15, 2025
35e12b6
Add DisposeReason.Deleted, .Elided
TedHartMS Mar 16, 2025
8f92e69
merge 'main'
TedHartMS Mar 19, 2025
cf3ab14
merge 'main'
TedHartMS Mar 19, 2025
012795d
WIP Span<byte>
TedHartMS Mar 23, 2025
a0aa148
WIP Span<byte>
TedHartMS Mar 24, 2025
494612b
WIP Span<byte>
TedHartMS Mar 24, 2025
5b7064f
WIP Span<byte>
TedHartMS Mar 24, 2025
8581f48
WIP Span<byte>
TedHartMS Mar 25, 2025
f870206
WIP Span<byte>
TedHartMS Mar 25, 2025
9d31c5e
WIP Span<byte>
TedHartMS Mar 26, 2025
31e4ff1
WIP Span<byte> (Tsavorite builds, with a couple hacks)
TedHartMS Mar 27, 2025
12813a4
WIP Span<byte>: YCSB fixes
TedHartMS Mar 28, 2025
54bdb41
WIP Span<byte>: more fixes found during YCSB
TedHartMS Mar 28, 2025
5168a2f
Switching CTT, CTRC, TempKv insertions to TSourceLogRecord direct cop…
TedHartMS Apr 5, 2025
7fdf35f
WIP Span<byte>: more cleanup in Compaction (no TSessionFunctions need…
TedHartMS Apr 8, 2025
c3008f8
WIP Span<byte>: LogRecord revisions in functions and prep Migrate/Rep…
TedHartMS Apr 9, 2025
9755afa
ISessionFunctions revisions
TedHartMS Apr 9, 2025
03c8fdc
Remove TInput, TOutput, TContext from Compact and PrepareIOForConditi…
TedHartMS Apr 9, 2025
0f1d14f
Remove WriteReason as it is no longer needed with Compaction, CopyToT…
TedHartMS Apr 9, 2025
b5b22ae
Missed a few WriteReason
TedHartMS Apr 10, 2025
1db7629
WIP Span<byte>: Cleanup DiskLogRecord deserialization and remove some…
TedHartMS Apr 11, 2025
2193395
Varebyte in DiskLogRecord
TedHartMS Apr 12, 2025
8fa2910
More LogRecord testing
TedHartMS Apr 15, 2025
631ed77
FInish DiskLogRecord serialization tests
TedHartMS Apr 15, 2025
e73e7d8
Rename SpanField to LogField
TedHartMS Apr 15, 2025
d49bcfc
Various cleanup, including PrepareForRevivification
TedHartMS Apr 22, 2025
fb98a20
WIP on converting Replication and Migration to LogRecord
TedHartMS Apr 22, 2025
34436fa
WIP on Repl (done-ish) and Migrate (mostly done except ISF) conversio…
TedHartMS Apr 24, 2025
744af73
Split IHO.Size into .MemorySize, DiskSize
TedHartMS Apr 25, 2025
160c332
Finish LogRecordization of Migrate
TedHartMS Apr 25, 2025
526e149
First fixes for Migration testing
TedHartMS Apr 25, 2025
f2d4c67
More Migrate testing; use SBAM.MemorySpan
TedHartMS Apr 27, 2025
12c797c
SImple Migrate tests now run
TedHartMS Apr 28, 2025
77b6105
Simple diskless replica runs
TedHartMS Apr 28, 2025
90793d2
Fixes for in-memory tests
TedHartMS Apr 29, 2025
0dd2039
Add UpsertValueSelector
TedHartMS Apr 29, 2025
c43401c
Remove PendingContext.IsAsync (a remnant of earlier, since-removed as…
TedHartMS Apr 29, 2025
3eb46a0
merge 'main'
TedHartMS Apr 30, 2025
eb20108
Merge 'tedhar/storage-v2'
TedHartMS May 1, 2025
b5205ec
Cleanup Read initialization of PendingContext
TedHartMS May 2, 2025
c415865
Fix record alignment in YCSB test
TedHartMS May 4, 2025
00b050d
tune HashBytes
TedHartMS May 4, 2025
4e043c1
Fix initial inserting in YCSB
TedHartMS May 5, 2025
cad3254
Update LogRecord.md and some cleanup
TedHartMS May 6, 2025
b4a942f
Restore TsavoriteAof naming back to TsavoriteLog
TedHartMS May 6, 2025
c7666db
Merge remote-tracking branch 'origin/main' into tedhar/storage-v2
TedHartMS May 6, 2025
48a31d4
merge 'tedhar/storage-v2'
TedHartMS May 6, 2025
83781a1
merge 'main'
TedHartMS May 12, 2025
3f06a7a
merge 'main'
TedHartMS May 13, 2025
0daf19e
Add changes for AddressType in logicalAddresses and enable minimal IO…
TedHartMS May 27, 2025
539db55
Merge 'main'; also fix a couple DbScan tests I missed with AddressType
TedHartMS May 27, 2025
36633c7
Fix a few more cursor tests (int => long)
TedHartMS May 27, 2025
f31ce8a
Fixes for review comments (except for "ref RecordSizeInfo")
TedHartMS May 27, 2025
11fdf3d
TSourceLogRecord and RecordSizeInfo parameters are readonly so make t…
TedHartMS May 28, 2025
ba3eed2
Fix some missing ref => in for TSourceLogRecord
TedHartMS May 29, 2025
62f4a73
Merge remote-tracking branch 'origin/main' into tedhar/storage-v2
TedHartMS May 29, 2025
7c15749
merge main part 1: it builds
TedHartMS Aug 21, 2025
437058e
Merge fixes; MigrateKeysWithObjects test still fails
TedHartMS Aug 22, 2025
057e7b8
Fix Object store migration typo
TedHartMS Aug 22, 2025
2f66f0b
Merge main
TedHartMS Sep 5, 2025
fe657ce
merge 'main'
TedHartMS Sep 12, 2025
cde0520
format
TedHartMS Sep 12, 2025
3114c48
ObjectAllocator serialization - not yet complete
TedHartMS Oct 5, 2025
18e48c7
Merge 'main' to tedhar/storage-v2
TedHartMS Oct 17, 2025
440f4d5
Garnet Storage v2 (#1384)
TalZaccai Oct 21, 2025
afc4beb
Removing unnecessary output flag
TalZaccai Oct 22, 2025
6692bd5
Fixes for StateMachineTests (Recovery)
TedHartMS Oct 22, 2025
224a33f
Merge branch 'tedhar/storage-v2' of https://github.com/microsoft/Garn…
TedHartMS Oct 22, 2025
9350b08
Fixes, mostly for Replication to include object log for UnifiedStore;…
TedHartMS Oct 23, 2025
d0967b7
fixes
TalZaccai Oct 23, 2025
caf48f4
Fixes for RESP UTs for Unified; clear logRecord on deserialization error
TedHartMS Oct 25, 2025
46eaee5
Remove SerializedSize(IsExact) from IHeapObject; various UT fixes
TedHartMS Oct 27, 2025
2c683c4
All Cluster.test now passes
TedHartMS Oct 27, 2025
b670a16
small fixes
TalZaccai Oct 27, 2025
3a16ac9
Fix TailAddress from Rescovery not being PageHeader-aligned
TedHartMS Oct 27, 2025
96019e2
Move RENAME to Unified Store and modify for LogRecord
TedHartMS Oct 28, 2025
e6d9e8d
Fixing rename with etag + removing remaining unnecessary GarnetObject…
TalZaccai Oct 29, 2025
ac7e4ae
Add ITsavoriteRecordObserver and fix Readcache size tracking
TedHartMS Oct 29, 2025
dab5e37
merge 'main'; fix missing wait in ClusterSimpleFailoverAuth test
TedHartMS Oct 29, 2025
aaa1d87
Convert LogRecord to use RecordLength
TedHartMS Nov 4, 2025
dfe4fce
More work on LogRecord.RecordLength
TedHartMS Nov 5, 2025
48d3e81
Finish LogRecord.RecordLength
TedHartMS Nov 6, 2025
8a824b9
Remove ObjectDb* from Sample*Txn
TedHartMS Nov 8, 2025
275ad84
MultiLevelPageArray stress fixes; improved LogRecord and RecordDataHe…
TedHartMS Nov 10, 2025
5064ed0
Fix GetObjectLogSegmentSize()
TedHartMS Nov 11, 2025
78e3292
Merge remote-tracking branch 'origin/dev' into tedhar/storage-v2
TedHartMS Nov 11, 2025
9bd2d28
update docs
TedHartMS Nov 11, 2025
0fd936f
Fix a couple comments
TedHartMS Nov 11, 2025
96b2800
Trim ObjectIdMap arrays on ClearPage
TedHartMS Nov 12, 2025
25ab0ff
wip
TalZaccai Nov 13, 2025
b4f0e58
wip
TalZaccai Nov 17, 2025
9924883
wip
TalZaccai Nov 17, 2025
085122c
wip
TalZaccai Nov 18, 2025
7a1ab05
wip
TalZaccai Nov 19, 2025
b0e8457
wip
TalZaccai Nov 19, 2025
034144d
wip
TalZaccai Nov 20, 2025
d871833
wip
TalZaccai Nov 21, 2025
136b833
Merge branch 'dev' into tedhar/storage-v2
TalZaccai Nov 21, 2025
020abdd
Merge branch 'tedhar/storage-v2' of https://github.com/microsoft/garn…
TalZaccai Nov 21, 2025
1e2a473
formatting tsavo
TalZaccai Nov 21, 2025
6e51c8b
Fixing website build error
TalZaccai Nov 21, 2025
490b57f
some renames
TalZaccai Nov 24, 2025
a392181
small rename
TalZaccai Nov 24, 2025
3d2960c
some small changes
TalZaccai Nov 24, 2025
0fcad4f
Version update
TalZaccai Nov 25, 2025
7be197e
merge 'main'
TedHartMS Nov 25, 2025
d722ae2
Address review comments; implement OA Truncate; add --value-overflow-…
TedHartMS Nov 27, 2025
b292fa9
ObjectAllocator testing
TedHartMS Nov 29, 2025
df8861c
Add large (multi-GB) object tests (and fix associated issues, mostly …
TedHartMS Dec 2, 2025
bb3dbe1
readcache fixes
TedHartMS Dec 3, 2025
1558ee3
Merge branch 'dev' into tedhar/storage-v2
TalZaccai Dec 3, 2025
86a45c0
Move KVSettings from GarnetServer to the individual Database, so we c…
TedHartMS Dec 4, 2025
746a94b
Merge branch 'tedhar/storage-v2' of https://github.com/microsoft/Garn…
TedHartMS Dec 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Version.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<!-- VersionPrefix property for builds and packages -->
<PropertyGroup>
<VersionPrefix>1.0.89</VersionPrefix>
<VersionPrefix>2.0.0-beta.1</VersionPrefix>
</PropertyGroup>
</Project>
24 changes: 12 additions & 12 deletions benchmark/BDN.benchmark/Custom/CustomTxnSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ sealed class CustomTxnSet : CustomTransactionProcedure
/// </summary>
public const string CommandName = "CTXNSET";

ArgSlice setA;
ArgSlice setB;
ArgSlice setC;
ArgSlice setD;
PinnedSpanByte setA;
PinnedSpanByte setB;
PinnedSpanByte setC;
PinnedSpanByte setD;

ArgSlice valueA;
ArgSlice valueB;
ArgSlice valueC;
ArgSlice valueD;
PinnedSpanByte valueA;
PinnedSpanByte valueB;
PinnedSpanByte valueC;
PinnedSpanByte valueD;

/// <summary>
/// CTXNSET key1 key2 key3 key4 value1 value2 value3 value4
Expand All @@ -52,10 +52,10 @@ public override bool Prepare<TGarnetReadApi>(TGarnetReadApi api, ref CustomProce
valueC = GetNextArg(ref procInput, ref offset);
valueD = GetNextArg(ref procInput, ref offset);

AddKey(setA, LockType.Exclusive, isObject: false);
AddKey(setB, LockType.Exclusive, isObject: false);
AddKey(setC, LockType.Exclusive, isObject: false);
AddKey(setD, LockType.Exclusive, isObject: false);
AddKey(setA, LockType.Exclusive, StoreType.Main);
AddKey(setB, LockType.Exclusive, StoreType.Main);
AddKey(setC, LockType.Exclusive, StoreType.Main);
AddKey(setD, LockType.Exclusive, StoreType.Main);

return true;
}
Expand Down
20 changes: 7 additions & 13 deletions benchmark/Resp.benchmark/OnlineReqGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public unsafe partial class OnlineReqGen
/// <summary>
/// DbSize, ObjectDbSize, NumBuffs
/// </summary>
public readonly int DbSize, ObjectDbSize, NumBuffs;
public readonly int DbSize, NumBuffs;

readonly byte[] ascii_chars = Encoding.ASCII.GetBytes("abcdefghijklmnopqrstvuwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
readonly byte[] number_chars = Encoding.ASCII.GetBytes("0123456789");
Expand All @@ -35,19 +35,11 @@ public unsafe partial class OnlineReqGen

public readonly int keyLen, valueLen;

public OnlineReqGen(int thread_id, int DbSize, bool randomGen = true, bool zipf = false, int keyLen = default, int valueLen = default, int objectDbSize = -1)
public OnlineReqGen(int thread_id, int DbSize, bool randomGen = true, bool zipf = false, int keyLen = default, int valueLen = default)
{
this.randomGen = randomGen;
this.DbSize = DbSize;
this.zipf = zipf;
if (objectDbSize == -1)
{
this.ObjectDbSize = DbSize;
}
else
{
this.ObjectDbSize = objectDbSize;
}

this.keyLen = Math.Max(NumUtils.NumDigits(DbSize), keyLen);
this.valueLen = valueLen == default ? 8 : valueLen;
Expand Down Expand Up @@ -113,7 +105,8 @@ public Memory<byte> GenerateKeyBytesRandom()
{
uint key = (uint)(randomGen ? (zipf ? zipfg.Next() : keyRandomGen.Next(DbSize)) : (keyIndex++ % DbSize));
key *= 20323;
for (int i = 0; i < keyLen; i++)
keyBuffer[0] = (byte)'S'; // Uniquifier to avoid collisions with object keys.
for (int i = 1; i < keyLen; i++)
{
keyBuffer[i] = ascii_chars[key % ascii_chars.Length];
key *= 3;
Expand Down Expand Up @@ -188,8 +181,9 @@ public Memory<byte> GenerateObjectEntryScoreBytes()
/// </summary>
public Memory<byte> GenerateObjectKeyBytesRandom()
{
uint key = (uint)(randomGen ? (zipf ? zipfg.Next() : keyRandomGen.Next(ObjectDbSize)) : (keyIndex++ % ObjectDbSize));
for (int i = 0; i < keyLen; i++)
uint key = (uint)(randomGen ? (zipf ? zipfg.Next() : keyRandomGen.Next(DbSize)) : (keyIndex++ % DbSize));
keyBuffer[0] = (byte)'O'; // Uniquifier to avoid collisions with string keys.
for (int i = 1; i < keyLen; i++)
{
keyBuffer[i] = ascii_chars[key % ascii_chars.Length];
key *= 3;
Expand Down
3 changes: 0 additions & 3 deletions benchmark/Resp.benchmark/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ public partial class Options
[Option("op-workload", Separator = ',', Default = new[] { OpType.GET, OpType.SET, OpType.DEL }, HelpText = "Workload of commands for online bench.")]
public IEnumerable<OpType> OpWorkload { get; set; }

[Option("object-dbsize", Required = false, Default = -1, HelpText = "Object DB size")]
public int ObjectDbSize { get; set; }

[Option("save-freq", Required = false, Default = 0, HelpText = "Save (checkpoint) frequency in seconds")]
public int SaveFreqSecs { get; set; }

Expand Down
3 changes: 2 additions & 1 deletion benchmark/Resp.benchmark/PeriodicCheckpointer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public void Start(string address, int port)
var server = redis.GetServer(address, port);
while (true)
{
if (cts.IsCancellationRequested) break;
if (cts.IsCancellationRequested)
break;
Thread.Sleep(periodMs);
try
{
Expand Down
1 change: 1 addition & 0 deletions benchmark/Resp.benchmark/ReqGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ private void RandomString()
{
for (int i = 0; i < valueBuffer.Length; i++)
{
// The first digit of the output string should not be zero.
if (i == 0)
valueBuffer[i] = ascii_digits[1 + valueRandomGen.Next(ascii_digits.Length - 1)];
else
Expand Down
12 changes: 8 additions & 4 deletions benchmark/Resp.benchmark/RespOnlineBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ private void InitializeClients()
private Thread[] InitializeThreadWorkers()
{
Thread[] workers = new Thread[NumThreads];
for (int idx = 0; idx < NumThreads; ++idx)
for (int idx = 0; idx < NumThreads; idx++)
{
int x = idx;

Expand Down Expand Up @@ -563,7 +563,7 @@ public async void OpRunnerGarnetClientSession(int thread_id)
_ = Interlocked.Increment(ref workerCount);
if (opts.BatchSize.First() != 1)
throw new Exception("Only batch size 1 supported for online bench");
var req = new OnlineReqGen(thread_id, opts.DbSize, true, opts.Zipf, opts.KeyLength, opts.ValueLength, opts.ObjectDbSize);
var req = new OnlineReqGen(thread_id, opts.DbSize, true, opts.Zipf, opts.KeyLength, opts.ValueLength);

GarnetClientSession client = null;
if (!opts.Pool)
Expand Down Expand Up @@ -607,8 +607,12 @@ public async void OpRunnerGarnetClientSession(int thread_id)
OpType.ZREM => await ZREM(),
OpType.ZCARD => await ZCARD(),
OpType.READWRITETX => await c.ExecuteAsync("READWRITETX", req.GenerateKey(), req.GenerateKey(), req.GenerateKey(), "1000"),
OpType.SAMPLEUPDATETX => await c.ExecuteAsync("SAMPLEUPDATETX", req.GenerateKeyRandom(), req.GenerateValue(), req.GenerateObjectKeyRandom(), req.GenerateObjectEntry(), req.GenerateObjectEntryScore(), req.GenerateObjectKeyRandom(), req.GenerateObjectEntry(), req.GenerateObjectEntryScore()),
OpType.SAMPLEDELETETX => await c.ExecuteAsync("SAMPLEDELETETX", req.GenerateKeyRandom(), req.GenerateObjectKeyRandom(), req.GenerateObjectEntry(), req.GenerateObjectKeyRandom(), req.GenerateObjectEntry()),
OpType.SAMPLEUPDATETX => await c.ExecuteAsync("SAMPLEUPDATETX", req.GenerateKeyRandom(), req.GenerateValue(), // stringKey
req.GenerateObjectKeyRandom(), req.GenerateObjectEntry(), req.GenerateObjectEntryScore(), // sortedSetKey1
req.GenerateObjectKeyRandom(), req.GenerateObjectEntry(), req.GenerateObjectEntryScore()), // sortedSetKey2
OpType.SAMPLEDELETETX => await c.ExecuteAsync("SAMPLEDELETETX", req.GenerateKeyRandom(), // stringKey
req.GenerateObjectKeyRandom(), req.GenerateObjectEntry(), // sortedSetKey1
req.GenerateObjectKeyRandom(), req.GenerateObjectEntry()), // sortedSetKey2
_ => throw new Exception($"opType: {op} benchmark not supported with {opts.Client} ClientType!")
};

Expand Down
4 changes: 2 additions & 2 deletions benchmark/Resp.benchmark/RespPerfBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public void PerformMGET(int NumOps, int NumThreads, int BatchSize = 1 << 12)
Thread[] workers = new Thread[NumThreads];

// Run the experiment.
for (int idx = 0; idx < NumThreads; ++idx)
for (int idx = 0; idx < NumThreads; idx++)
{
int x = idx;
workers[idx] = new Thread(() => MGetThreadRunner(x, NumOps, BatchSize));
Expand Down Expand Up @@ -323,7 +323,7 @@ public ReqGen LightOperate(
Thread[] workers = new Thread[NumThreads];

// Run the experiment.
for (int idx = 0; idx < NumThreads; ++idx)
for (int idx = 0; idx < NumThreads; idx++)
{
int x = idx;
workers[idx] = opts.Client switch
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Resp.benchmark/TxnPerfBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void Run()
redis = Program.redis;
}
}
for (int idx = 0; idx < NumThreads; ++idx)
for (int idx = 0; idx < NumThreads; idx++)
{
int x = idx;

Expand Down
2 changes: 1 addition & 1 deletion benchmark/Resp.benchmark/ZipfGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public ZipfGenerator(RandomGenerator rng, int size, double theta = 0.99)
private static double Zeta(int count, double theta)
{
double zetaN = 0.0;
for (var ii = 1; ii <= count; ++ii)
for (var ii = 1; ii <= count; ii++)
zetaN += 1.0 / Math.Pow(ii, theta);
return zetaN;
}
Expand Down
11 changes: 8 additions & 3 deletions libs/client/ClientSession/GarnetClientSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -559,12 +559,17 @@ private unsafe void Flush()
Dispose();
throw;
}
networkSender.GetResponseObject();
offset = networkSender.GetResponseObjectHead();
end = networkSender.GetResponseObjectTail();
ResetOffset();
}
}

private unsafe void ResetOffset()
{
networkSender.GetResponseObject();
offset = networkSender.GetResponseObjectHead();
end = networkSender.GetResponseObjectTail();
}

/// <inheritdoc />
public bool TryCreateMessageConsumer(Span<byte> bytesReceived, INetworkSender networkSender, out IMessageConsumer session)
=> throw new NotSupportedException();
Expand Down
69 changes: 0 additions & 69 deletions libs/client/ClientSession/GarnetClientSessionClusterExtensions.cs

This file was deleted.

Loading
Loading