public Set advisePrimaryOwners() {
    ProxyBucketRegion[] bucs = buckets;
    HashSet<InternalDistributedMember> hs = new HashSet<>();
    for (int i = 0; i < bucs.length; i++) {
      if (isStorageAssignedForBucket(i)) {
        InternalDistributedMember mem = bucs[i].getBucketAdvisor().getPrimary();
        if (mem != null) {
          hs.add(mem);
        }
      }
    }
    return hs;
  }
Find the set of members which own primary buckets, including the local member

@return set of InternalDistributedMember ids
geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RegionAdvisor.java