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
Improve map deletion from Wan status #615
Conversation
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.
I just have one suggestion. Other than that, LGTM! After you address or give an answer, I'll approve.
for mapWanKey := range wan.Status.WanReplicationMapsStatus { | ||
m, ok := publishedMaps[mapWanKey] | ||
if !ok { | ||
// Delete map without publisherID from status | ||
if err := deleteWanMapStatus(ctx, r.Client, wan, mapWanKey); err != nil { | ||
return err | ||
} | ||
continue | ||
} |
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.
Since you remove the map with empty publisherId
from the status in the stopWanReplicationMap, I think we don't need to change here and an additional check for publisherId
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.
Yes, but how are we going to generate a client for that map? Client is a parameter for stopWanReplicationMap function. Map and Hazelcast CR might have been deleted already.
Description
Improved map deletion from Wan status when publisher ID was empty. Also improved logs for easier debugging.
User Impact