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

Instead of sync on PersistentMemberManager using CopyOnWrite structure #518

Open
wants to merge 1 commit into
base: snappy/master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.gemstone.gemfire.distributed.internal.ProfileListener;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.internal.CopyOnWriteHashSet;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.util.TransformUtils;
Expand All @@ -47,7 +48,7 @@ public class PersistentMemberManager {
private Map<PersistentMemberPattern, PendingRevokeListener> pendingRevokes
= new HashMap<PersistentMemberPattern, PendingRevokeListener>();

private final Set<PersistentMemberPattern> doNotWait = new HashSet();
private final Set<PersistentMemberPattern> doNotWait = new CopyOnWriteHashSet();
private volatile boolean unblockNonHostingBuckets = false;

private static final Object TOKEN = new Object();
Expand All @@ -69,7 +70,7 @@ public void revokeMember(PersistentMemberPattern pattern) {
}

public boolean doNotWaitOnMember(PersistentMemberID id) {
synchronized (this) {
if (this.unblockNonHostingBuckets) {
for (PersistentMemberPattern p : this.doNotWait) {
if (p.matches(id))
return true;
Expand Down