PGSQL Thread safety checks turned back on until we're confident; performance gain is negligible by having them off

This commit is contained in:
2025-09-15 02:50:45 +01:00
parent 919ab864ce
commit 5a6bf4e7c2
5 changed files with 7 additions and 7 deletions

View File

@@ -214,7 +214,7 @@ public class Startup
builder.MigrationsHistoryTable("_efmigrationshistory", "public");
builder.MigrationsAssembly("MareSynchronosShared");
}).UseSnakeCaseNamingConvention();
options.EnableThreadSafetyChecks(false);
options.EnableThreadSafetyChecks();
}, mareConfig.GetValue(nameof(MareConfigurationBase.DbContextPoolSize), 1024));
services.AddDbContextFactory<MareDbContext>(options =>
{
@@ -223,7 +223,7 @@ public class Startup
builder.MigrationsHistoryTable("_efmigrationshistory", "public");
builder.MigrationsAssembly("MareSynchronosShared");
}).UseSnakeCaseNamingConvention();
options.EnableThreadSafetyChecks(false);
options.EnableThreadSafetyChecks();
});
}
}

View File

@@ -67,7 +67,7 @@ public class SystemInfoService : IHostedService, IDisposable
{
_logger.LogTrace("Sending System Info, Online Users: {onlineUsers}", onlineUsers);
_hubContext.Clients.All.Client_UpdateSystemInfo(SystemInfoDto);
_ = _hubContext.Clients.All.Client_UpdateSystemInfo(SystemInfoDto);
using var scope = _services.CreateScope();
using var db = scope.ServiceProvider.GetService<MareDbContext>()!;

View File

@@ -245,7 +245,7 @@ public class Startup
builder.MigrationsHistoryTable("_efmigrationshistory", "public");
builder.MigrationsAssembly("MareSynchronosShared");
}).UseSnakeCaseNamingConvention();
options.EnableThreadSafetyChecks(false);
options.EnableThreadSafetyChecks();
}, mareConfig.GetValue(nameof(MareConfigurationBase.DbContextPoolSize), 1024));
services.AddDbContextFactory<MareDbContext>(options =>
{
@@ -254,7 +254,7 @@ public class Startup
builder.MigrationsHistoryTable("_efmigrationshistory", "public");
builder.MigrationsAssembly("MareSynchronosShared");
}).UseSnakeCaseNamingConvention();
options.EnableThreadSafetyChecks(false);
options.EnableThreadSafetyChecks();
});
}

View File

@@ -45,7 +45,7 @@ public class Startup
{
builder.MigrationsHistoryTable("_efmigrationshistory", "public");
}).UseSnakeCaseNamingConvention();
options.EnableThreadSafetyChecks(false);
options.EnableThreadSafetyChecks();
}, Configuration.GetValue(nameof(MareConfigurationBase.DbContextPoolSize), 1024));
services.AddSingleton(m => new MareMetrics(m.GetService<ILogger<MareMetrics>>(), new List<string> { },

View File

@@ -108,7 +108,7 @@ public class Startup
{
builder.MigrationsHistoryTable("_efmigrationshistory", "public");
}).UseSnakeCaseNamingConvention();
options.EnableThreadSafetyChecks(false);
options.EnableThreadSafetyChecks();
}, mareConfig.GetValue(nameof(MareConfigurationBase.DbContextPoolSize), 1024));
var signalRServiceBuilder = services.AddSignalR(hubOptions =>