diff --git a/cs/remote/samples/FixedLenClient/Program.cs b/cs/remote/samples/FixedLenClient/Program.cs
index b91cfa7d2..c24835e56 100644
--- a/cs/remote/samples/FixedLenClient/Program.cs
+++ b/cs/remote/samples/FixedLenClient/Program.cs
@@ -17,6 +17,7 @@ class Program
{
static void Main(string[] args)
{
+ Environment.SetEnvironmentVariable("DOTNET_SYSTEM_NET_SOCKETS_INLINE_COMPLETIONS", "1");
string ip = "127.0.0.1";
int port = 3278;
diff --git a/cs/remote/samples/FixedLenServer/FixedLenServer.csproj b/cs/remote/samples/FixedLenServer/FixedLenServer.csproj
index c205d6c8e..2a2976167 100644
--- a/cs/remote/samples/FixedLenServer/FixedLenServer.csproj
+++ b/cs/remote/samples/FixedLenServer/FixedLenServer.csproj
@@ -6,6 +6,7 @@
true
AnyCPU;x64
latest
+ true
diff --git a/cs/remote/samples/FixedLenServer/Program.cs b/cs/remote/samples/FixedLenServer/Program.cs
index fc00c4b82..f28ee1aa6 100644
--- a/cs/remote/samples/FixedLenServer/Program.cs
+++ b/cs/remote/samples/FixedLenServer/Program.cs
@@ -18,6 +18,7 @@ class Program
{
static void Main(string[] args)
{
+ Environment.SetEnvironmentVariable("DOTNET_SYSTEM_NET_SOCKETS_INLINE_COMPLETIONS", "1");
Trace.Listeners.Add(new ConsoleTraceListener());
Console.WriteLine("FASTER fixed-length (binary) KV server");
diff --git a/cs/remote/samples/VarLenClient/Program.cs b/cs/remote/samples/VarLenClient/Program.cs
index aad8cee54..a48406f02 100644
--- a/cs/remote/samples/VarLenClient/Program.cs
+++ b/cs/remote/samples/VarLenClient/Program.cs
@@ -13,6 +13,7 @@ class Program
{
static void Main(string[] args)
{
+ Environment.SetEnvironmentVariable("DOTNET_SYSTEM_NET_SOCKETS_INLINE_COMPLETIONS", "1");
string ip = "127.0.0.1";
int port = 3278;
diff --git a/cs/remote/src/FASTER.server/Providers/SpanByteFasterKVProvider.cs b/cs/remote/src/FASTER.server/Providers/SpanByteFasterKVProvider.cs
index 482635371..89cc5ca9e 100644
--- a/cs/remote/src/FASTER.server/Providers/SpanByteFasterKVProvider.cs
+++ b/cs/remote/src/FASTER.server/Providers/SpanByteFasterKVProvider.cs
@@ -8,13 +8,32 @@ namespace FASTER.server
/// Session provider for FasterKV store based on
/// [K, V, I, O, C] = [SpanByte, SpanByte, SpanByte, SpanByteAndMemory, long]
///
- public sealed class SpanByteFasterKVProvider : ISessionProvider
+ public class SpanByteFasterKVProvider : ISessionProvider
{
- readonly FasterKV store;
- readonly SpanByteServerSerializer serializer;
- readonly SubscribeKVBroker> kvBroker;
- readonly SubscribeBroker> broker;
- readonly MaxSizeSettings maxSizeSettings;
+ ///
+ /// Store
+ ///
+ protected readonly FasterKV store;
+
+ ///
+ /// Serializer
+ ///
+ protected readonly SpanByteServerSerializer serializer;
+
+ ///
+ /// KV broker
+ ///
+ protected readonly SubscribeKVBroker> kvBroker;
+
+ ///
+ /// Broker
+ ///
+ protected readonly SubscribeBroker> broker;
+
+ ///
+ /// Size settings
+ ///
+ protected readonly MaxSizeSettings maxSizeSettings;
///
/// Create SpanByte FasterKV backend
@@ -22,12 +41,12 @@ public sealed class SpanByteFasterKVProvider : ISessionProvider
///
///
///
- ///
+ ///
///
- public SpanByteFasterKVProvider(FasterKV store, SubscribeKVBroker> kvBroker = null, SubscribeBroker> broker = null, ServerOptions serverOptions = null, MaxSizeSettings maxSizeSettings = default)
+ public SpanByteFasterKVProvider(FasterKV store, SubscribeKVBroker> kvBroker = null, SubscribeBroker> broker = null, bool recoverStore = false, MaxSizeSettings maxSizeSettings = default)
{
this.store = store;
- if ((serverOptions ?? new ServerOptions()).Recover)
+ if (recoverStore)
{
try
{
@@ -43,7 +62,7 @@ public SpanByteFasterKVProvider(FasterKV store, SubscribeKVB
}
///
- public IServerSession GetSession(WireFormat wireFormat, Socket socket)
+ public virtual IServerSession GetSession(WireFormat wireFormat, Socket socket)
{
switch (wireFormat)
{
diff --git a/cs/remote/src/FASTER.server/Servers/VarLenServer.cs b/cs/remote/src/FASTER.server/Servers/VarLenServer.cs
index 60c06a731..78855aa28 100644
--- a/cs/remote/src/FASTER.server/Servers/VarLenServer.cs
+++ b/cs/remote/src/FASTER.server/Servers/VarLenServer.cs
@@ -45,7 +45,7 @@ public VarLenServer(ServerOptions opts)
}
// Create session provider for VarLen
- provider = new SpanByteFasterKVProvider(store, kvBroker, broker, opts);
+ provider = new SpanByteFasterKVProvider(store, kvBroker, broker, opts.Recover);
server = new FasterServer(opts.Address, opts.Port);
server.Register(WireFormat.DefaultVarLenKV, provider);