Skip to content
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

RemoveContentCommand executor is not thread-safe #733

Open
Marcono1234 opened this issue Jul 24, 2021 · 0 comments
Open

RemoveContentCommand executor is not thread-safe #733

Marcono1234 opened this issue Jul 24, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Marcono1234
Copy link
Contributor

The Bug

RemoveContentCommand uses a separate new thread as executor:

It appears this is not thread-safe, mainly due to the issue.addRawRestrictedComment call which accesses the helper messages which are mutable and might be updated during regular execution.
Maybe there are also other parts which are not thread-safe; and even if that is not the case it is pretty error-prone.

Expected behavior

Not sure. I assume when #512 added the command the separate executor thread was used since content removal might be time intensive. We should probably check whether that is actually a problem. Having a separate executor thread would likely also make fixing #527 (respectively performing the necessary refactoring) more difficult.

Maybe we can use the normal execution thread for the content removal and, if necessary, adjust IssueUpdateContextCache#applyChanges (or its successor) to perform pauses when processing a large amount of updates.

@Marcono1234 Marcono1234 added the bug Something isn't working label Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant