Skip to content

Commit 4f62e3e

Browse files
committed
Increases command timeout for partition management.
Increases the command timeout to 5 minutes for partition management operations. This change addresses potential timeout issues during partition cleanup, especially with the introduction of smaller, more frequent partitions. Long running partition delete operations might exceed the default timeout.
1 parent 4448035 commit 4f62e3e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/ServiceControl.Audit.Persistence.Sql.SqlServer/Infrastructure/SqlServerPartitionManager.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public async Task DropPartition(AuditDbContextBase dbContext, DateTime partition
5252
// on ProcessedMessages is not partition-aligned and blocks the operation.
5353
// DELETE with a range filter benefits from partition elimination so only the
5454
// target partition is scanned.
55+
dbContext.Database.SetCommandTimeout(TimeSpan.FromMinutes(5));
56+
5557
foreach (var table in PartitionedTables)
5658
{
5759
await dbContext.Database.ExecuteSqlRawAsync(

0 commit comments

Comments
 (0)