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:
@@ -197,7 +197,6 @@ public class ObservationService : IObservationService
|
||||
if (encounter.Status != EncounterStatus.Active)
|
||||
throw new ValidationException("Encounter not active.", "ENCOUNTER_NOT_ACTIVE");
|
||||
|
||||
await using var tx = await _db.Database.BeginTransactionAsync(ct);
|
||||
try
|
||||
{
|
||||
var observation = new Observation
|
||||
@@ -267,11 +266,10 @@ public class ObservationService : IObservationService
|
||||
}, obs.EncounterId.ToString()));
|
||||
|
||||
await _db.SaveChangesAsync(ct);
|
||||
await tx.CommitAsync(ct);
|
||||
}
|
||||
catch (DbUpdateException ex) when (IsUniqueViolation(ex))
|
||||
{
|
||||
await tx.RollbackAsync(ct);
|
||||
_db.ChangeTracker.Clear();
|
||||
// silent skip — idempotency key already applied
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user