Fix Kafka retry seek, bound buffers, and cut hot-path CPU/memory waste (Phases 41–44).
Stop consumers from committing past failed offsets, harden Rabbit/DataLake/gateway backpressure, dispose JsonDocument/MinIO correctly, and batch expensive DB/HTTP paths. Track progress in docs/performance.
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
public class LocalWarningEvaluator
|
||||
{
|
||||
private readonly GatewayDbContext _db;
|
||||
private readonly GatewayOptions _gateway;
|
||||
private readonly ILogger<LocalWarningEvaluator> _logger;
|
||||
|
||||
public LocalWarningEvaluator(GatewayDbContext db, ILogger<LocalWarningEvaluator> logger)
|
||||
public LocalWarningEvaluator(
|
||||
GatewayDbContext db,
|
||||
IOptions<GatewayOptions> gateway,
|
||||
ILogger<LocalWarningEvaluator> logger)
|
||||
{
|
||||
_db = db;
|
||||
_gateway = gateway.Value;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
@@ -52,7 +58,8 @@ public class LocalWarningEvaluator
|
||||
severity = AlertSeverity.Warning.ToDbString(),
|
||||
details,
|
||||
generatedAt = triggeredAt
|
||||
}, $"alert:{clientAlertId}", encounterId, triggeredAt);
|
||||
}, $"alert:{clientAlertId}", encounterId, triggeredAt,
|
||||
_gateway.MaxBufferedSyncItems);
|
||||
|
||||
_logger.LogInformation(
|
||||
"WARNING alert {AlertId} created locally for encounter {EncounterId}",
|
||||
|
||||
Reference in New Issue
Block a user