Skip to content

Conversation

@mhansonp
Copy link
Contributor

GEODE-10039: Fix to remove a stale profile when waiting for a new primary will never succeed.


Profile[] locProfiles = profiles; // grab current profiles
for (int i = 0; i < locProfiles.length; i++) {
if (locProfiles[i].getDistributedMember().getId() == member.getId()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of ==, it should be equals(). Otherwise, it is comparing the references instead of the strings. Or locProfiles[i].getDistributedMember().equals(member) also works.

ProfileId id = getProfileIdForMember(member);
logger.warn("Removing profile for member " + member + " profileid = " + id
+ " because we think it is stale");
removeId(id, false, false, false);
Copy link
Contributor

Choose a reason for hiding this comment

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

I am afraid this could potentially remove the non-stale ServerBucketProfile.

@mhansonp mhansonp closed this Apr 20, 2022
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.

2 participants