-
Couldn't load subscription status.
- Fork 362
Replace HashSet with ConcurrentDictionary in WorkflowLoggingService #1556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace HashSet with ConcurrentDictionary in WorkflowLoggingService #1556
Conversation
5bb541e to
b795ca2
Compare
|
First of all, thank you for taking the time to spot this and submit a PR - I really appreciate it! Could you please sign your commit? You can read more about DCO requirement here, but we'll need it in place before the PR can be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me - good to go once the DCO is in place.
|
I have force-pushed with the requried string, but for some reason the DCO does not register it? edit: I have check the documetation you linked, and it only seems to require adding a "Signed-off-by" -line to the commit. I did that yesterday through a force-push, but the DCO check is still red. Does it have to be re-activated or something? |
Looks like it's failing because the email address you're using in GitHub doesn't match the one you signed off with. If you can either add the other one to GitHub or change the DCO to match, we'll be square here. |
|
Ah, I understand. I have many e-mail addresses, and I'm not 100% sure which github thinks I should use. I'll force-push a new one with a likely address :) |
3070b43 to
00726e2
Compare
This should help with issue dapr#1273 - intermittent exceptions from WorkflowLoggingService. There is no concurrent HashSet in .NET, so we use ConcurrentDictionary with a byte as the value to simulate a set. For this use-case we do not care if the Key already exists, so we can use TryAdd to add items without considering the return value. Signed-off-by: Tomas Ekeli <[email protected]>
00726e2 to
78aba15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
|
Thank you very much for your contribution here! |
This should help with issue #1273 - intermittent exceptions from WorkflowLoggingService.
There is no concurrent HashSet in .NET, so we use ConcurrentDictionary with a byte as the value to simulate a set. For this use-case we do not care if the Key already exists, so we can use TryAdd to add items without considering the return value.
Description
Replaces
HashSet<string>as the collection that stores Activity and Workflow names for logging withConcurrentDictionary<string, byte>Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #1273
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: