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

[MI-2949]:Added a check to remove pre existing autolinks #45

Merged
merged 2 commits into from
Jan 18, 2024
Merged

Conversation

Kshitij-Katiyar
Copy link

@avas27JTG avas27JTG merged commit df69291 into mm-773 Jan 18, 2024
@avas27JTG avas27JTG deleted the MI-2949 branch January 18, 2024 11:39
Comment on lines +403 to +411
var keys []string
for _,autolink:= range installList {
keys = append(keys,autolink.Name)
}

// Deleting the old autolinks if already present
if err := client.Delete(keys...); err != nil {
return fmt.Errorf("unable to delete autolinks: %w", err)
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@avas27JTG This will likely have issues in HA environments, with multiple instances of the plugin running at the same time. They will be fighting over reading/deleting/creating the autolinks. @hanzei What are your thoughts on this?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we simply have a giant lock around the function and check first, if the autolinks need to get generated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants