pivotal-eshu commented on code in PR #7630:
URL: https://github.com/apache/geode/pull/7630#discussion_r860254008
##########
geode-core/src/main/java/org/apache/geode/internal/cache/BucketAdvisor.java:
##########
@@ -896,9 +888,10 @@ private void removePrimary(InternalDistributedMember
member) {
((BucketRegion) br).beforeReleasingPrimaryLockDuringDemotion();
}
- releasePrimaryLock();
// this was a deposePrimary call so we need to depose children as well
deposePrimaryForColocatedChildren();
+ releasePrimaryLock();
Review Comment:
releasePrimaryLock() will release the distributed lock on parent region. Now
any node (including the one trying to become primary) can get that lock and
becomes primary. And operation can be generated on the new primary on parent
region. This change will guarantee that all colocated buckets deposed primary
before another server can become new primary for any colocated buckets.
You are also right that node with original primary colocated buckets should
be blocked on operations on the colocated regions. Even though new primary is
being acquired by another server, the original old primary will not allow any
new operations on the colocated child buckets. I guess only one is needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]