From c5aefce2ef442dd3571b9e76eb45bada7e7c1b4e Mon Sep 17 00:00:00 2001 From: Sebastian Burckhardt Date: Tue, 24 Jan 2023 13:29:57 -0800 Subject: [PATCH] fix race on index data structure caused by locking wrong object (#219) --- src/DurableTask.Netherite/PartitionState/StatsState.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DurableTask.Netherite/PartitionState/StatsState.cs b/src/DurableTask.Netherite/PartitionState/StatsState.cs index 995c09c..87a2315 100644 --- a/src/DurableTask.Netherite/PartitionState/StatsState.cs +++ b/src/DurableTask.Netherite/PartitionState/StatsState.cs @@ -85,7 +85,7 @@ namespace DurableTask.Netherite if (this.InstanceIds != null) { - lock (this) + lock (this.InstanceIds) { if (!evt.DeleteInstance) { @@ -105,7 +105,7 @@ namespace DurableTask.Netherite if (this.InstanceIds != null) { - lock (this) + lock (this.InstanceIds) { foreach (var key in evt.Purged) {