Contact: deterministische OrderBy in de opschoon-queries (RowLimitingOperationWithoutOrderByWarning bij opstart)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -123,6 +123,7 @@ public class ContactRepository(ContactDbContext context) : IContactRepository
|
||||
{
|
||||
var batch = await context.ContactMessages
|
||||
.Where(m => m.RetentionUntil < now)
|
||||
.OrderBy(m => m.RetentionUntil).ThenBy(m => m.Id)
|
||||
.Take(BatchSize)
|
||||
.ToListAsync(cancellationToken);
|
||||
if (batch.Count == 0)
|
||||
@@ -143,6 +144,7 @@ public class ContactRepository(ContactDbContext context) : IContactRepository
|
||||
{
|
||||
var batch = await context.IdempotencyRecords
|
||||
.Where(r => r.CreatedAt < cutoff)
|
||||
.OrderBy(r => r.CreatedAt).ThenBy(r => r.SiteId).ThenBy(r => r.Key)
|
||||
.Take(BatchSize)
|
||||
.ToListAsync(cancellationToken);
|
||||
if (batch.Count == 0)
|
||||
|
||||
Reference in New Issue
Block a user