Azure / Azure/durabletask

Unimplemented locking in ActivityTaskHandler

Open
#1,083 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.7k
Forks
335
Avg merge
2d 23h
Merged PRs (30d)
6

Description

I've noticed that in ActivityTaskHandler there's this unused code:

````
//TODO: Eventually these will need to be Redis locks once we have a multiple worker scenario
private readonly SemaphoreSlim incomingQueueLock = new SemaphoreSlim(1);

//TODO: This locking approach currently has a race condition that allows an activity task to be called multiple
// times. Will likely require a somewhat substantial redesign to fix.
private readonly ConcurrentDictionary taskLocks;
````

Was there some intention to be some locking here? I can help with implementing [AsyncKeyedLock](https://github.com/MarkCiliaVincenti/AsyncKeyedLock) here, which is used in https://github.com/Azure/apiops, https://github.com/microsoft/Vipr and https://github.com/microsoft/kiota

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.