Skip to content

Commit 8dba86e

Browse files
authored
Fix data race in activity guard (#14447)
1 parent 8c6a599 commit 8dba86e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ydb/library/actors/core/activity_guard.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class TInternalActorTypeGuard {
4545

4646
~TInternalActorTypeGuard() {
4747
if (Allowed) {
48-
ChangeActivity(GetCycleCountFast(), Index, NextIndex);
48+
ui32 prevIndex = Index;
49+
ChangeActivity(GetCycleCountFast(), prevIndex, NextIndex);
4950
}
5051
}
5152

0 commit comments

Comments
 (0)