DonalEvans commented on a change in pull request #7323:
URL: https://github.com/apache/geode/pull/7323#discussion_r840015672
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/BucketAdvisor.java
##########
@@ -1160,6 +1169,7 @@ private boolean acquiredPrimaryLock() {
try {
synchronized (this) {
if (isHosting() && (isVolunteering() || isBecomingPrimary())) {
+ hasBecomePrimary = isBecomingPrimary();
Review comment:
What about the case where the bucket was a secondary but is being
promoted to primary due to rebalance, rather than due to recovering after a
restart? The code path for this would start in
`PartitionedRegionRebalanceOp.movePrimaryBucketForRegion()` and end up in this
`acquiredPrimaryLock()` method.
I'm also still concerned about the potential for incorrect behaviour if a
bucket stops being primary due to rebalance, as the `hasBecomePrimary` field
will still be true, even though the bucket is not primary.
--
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]