-
Notifications
You must be signed in to change notification settings - Fork 41
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
Duplicate categories are created if new members are assigned to channels and channels are assigned to categories #120
Comments
Is there any update on this issue? |
Do you need any additional information about this issue from my side? Thanks for letting me know! |
HI @christianhueserhzdr, thank you for filing this issue. I'm thinking we can solve this in the welcomebot plugin, by debouncing the operations of adding the user to multiple channels. We currently do not do any "waiting" in between adding the user to different channels. If we add some wait period (~3seconds) I think that would be enough to avoid this issue. What are your thoughts on this? Here are the two places we are doing this operation in a loop: |
@raghavaggarwal2308 For context, there is a feature called "Channel Actions" in the playbooks plugin https://github.com/mattermost/mattermost-plugin-playbooks, that allows an admin to configure the channel to make it so whenever a new user joins the channel, they will have that channel added to a specific channel category. It seems there is a race condition happening with the welcomebot and playbooks plugins, where the welcomebot plugin is adding users to the channels too quickly, so the "channel category add" process can end up creating new categories instead of using existing ones, which results in duplicate channel categories. If we slow down the welcomebot's channel member modifications to avoid this race condition, I think the issue will be avoided. |
Thank you very much, Michael @mickmister, for looking into this issue report and writing down your opinion on how to resolve it. Regarding your suggestion, adding some wait period is a quick fix in some cases, but personally I do not consider waiting times to be very sustainable. This issue will recur from time to time when the waiting period has not been long enough. On the other hand, introducing a waiting period of 3 seconds or more will result in a longer processing times, if several tens of channels and multiple categories are involved as already seen in some cases. I would very much prefer to see that these race conditions are solved, if this is possible. I can imaging that this needs to be solved on both sides, Mattermost and the plugin. Anyhow, thank you very much for your feedback and thoughts! I am glad that someone is looking after this issue. 🙂 Please let me know how you would like to solve it. Thanks! Christian |
@christianhueserhzdr We've decided to handle this issue in both places (waiting in the plugin, and avoiding race conditions in the platform). I'm thinking the plugin fix will arrive sooner. We'll keep you updated here. Thanks @christianhueserhzdr! |
Dear Michael @mickmister and Ben @hanzei, are there any plans to continue with this issue and the corresponding PR #124? Thank you very much for your effort and for letting me know! |
Working on this plugin is not a priority at the moment. I don't think the PR will get traction. Sorry. |
The automatic assignment of new team members to channels and the triggered automatic assignment of this channels to the new member's categories creates duplicate categories.
I assume that the assignment of members to channels triggers the assignment of channels to categories. If this member to channel assignments are not finished when the channel to category assignments start there will be duplicate categories because when the check occurs if the category is already present or needs to be created there are several triggered channel to category assignments which all think that no category has yet been created, thus they all create duplicate categories. Which is an issue of concurrency.
I would suggest
Please let me know if this an issue that the Mattermost server can only deal with and I create an issue there.
Thank you very much for looking into this issue and for your valuable feedback! 🙂
The text was updated successfully, but these errors were encountered: