/** * Used to bootstrap txState. * @param key * @return distributedRegions, * member with parimary bucket for partitionedRegions */ @Override public DistributedMember getOwnerForKey(KeyInfo key) { //Asif: fix for sqlfabric bug 42266 assert !this.isInternalRegion() || this.isMetaRegionWithTransactions(); if (!this.getAttributes().getDataPolicy().withStorage() || (this.concurrencyChecksEnabled && this.getAttributes() .getDataPolicy() == DataPolicy.NORMAL)) { // execute on random replicate return getRandomReplicate(); } // if we are non-persistent, forward transactions to // a persistent member if (this.concurrencyChecksEnabled && !generateVersionTag) { return getRandomPersistentReplicate(); } return super.getOwnerForKey(key); }
protected void checkVersionTag(DistributedRegion rgn, VersionTag tag) { RegionAttributes attr = rgn.getAttributes(); if (attr.getConcurrencyChecksEnabled() && attr.getDataPolicy().withPersistence() && attr.getScope() != Scope.GLOBAL && (tag.getMemberID() == null || test_InvalidVersion)) { if (logger.isDebugEnabled()) { logger.debug("Version tag is missing the memberID: {}", tag); } String msg = LocalizedStrings.DistributedPutAllOperation_MISSING_VERSION .toLocalizedString(tag); RuntimeException ex = (sender.getVersionObject().compareTo(Version.GFE_80) < 0) ? new InternalGemFireException(msg) : new InvalidVersionException(msg); throw ex; } }
} else if (this.getAttributes().getDataPolicy().withReplication() || this.getAttributes().getDataPolicy().withPreloaded()) {
if (this.getAttributes().getDataPolicy().withReplication() || this.getAttributes().getDataPolicy().withPreloaded()) {
protected void checkVersionTag(DistributedRegion rgn, VersionTag tag) { RegionAttributes attr = rgn.getAttributes(); if (attr.getConcurrencyChecksEnabled() && attr.getDataPolicy().withPersistence() && attr.getScope() != Scope.GLOBAL && (tag.getMemberID() == null || test_InvalidVersion)) { if (rgn.getLogWriterI18n().fineEnabled()) { rgn.getLogWriterI18n().info(LocalizedStrings.DEBUG, "Version tag is missing the memberID: " + tag); } String msg = LocalizedStrings.DistributedPutAllOperation_MISSING_VERSION .toLocalizedString(tag); RuntimeException ex = (sender.getVersionObject().compareTo(Version.GFXD_101) < 0) ? new InternalGemFireException(msg) : new InvalidVersionException(msg); throw ex; } } }