/** * Wait for in progress clears that were initiated by this member. */ private void waitForInProgressClear() { RegionVersionVector rvv = getVersionVector(); if (rvv != null) { synchronized(clearLock) { //do nothing; //DAN - I'm a little scared that the compiler might optimize //away this synchronization if we really do nothing. Hence //my fine log message below. This might not be necessary. getLogWriterI18n().fine("Done waiting for clear"); } } }
protected RegionEntry basicPutEntry(EntryEventImpl event, final TXStateInterface tx, long lastModified) throws TimeoutException, CacheWriterException { if (getLogWriterI18n().finerEnabled()) { getLogWriterI18n().finer("basicPutEntry invoked for event " + event); } if (this.requiresOneHopForMissingEntry(event)) { // bug #45704: see if a one-hop must be done for this operation RegionEntry re = getRegionEntry(event.getKey()); if (re == null /*|| re.isTombstone()*/ || !this.generateVersionTag) { final boolean ifNew = false; final boolean ifOld = false; boolean didDistribute = RemotePutMessage.distribute(event, lastModified, ifNew, ifOld, null, false, !this.generateVersionTag); if (!this.generateVersionTag && !didDistribute) { throw new PersistentReplicatesOfflineException(); } if (didDistribute) { if (getLogWriterI18n().finerEnabled()) { getLogWriterI18n().finer("Event after remotePut for basicPutEntry: " + event); } } } } return super.basicPutEntry(event, lastModified); }
if (rgn.getLogWriterI18n().fineEnabled()) { rgn.getLogWriterI18n().fine( " Received batch destroyed message with key " + key + "tail key " + tailKey + " the size of the region is " + rgn.size() + " the keys are " + rgn.keys()); rgn.localDestroy(k, RegionQueue.WAN_QUEUE_TOKEN); } catch (EntryNotFoundException e) { if (rgn.getLogWriterI18n().fineEnabled()) { rgn.getLogWriterI18n().fine( "For key " + k + " there is no entry in the region.");
@Override public void distribute() { LogWriterI18n log = getRegion().getLogWriterI18n(); try { super.distribute(); } catch (InvalidVersionException e) { if (DistributionManager.VERBOSE || log.fineEnabled()) { log.info(LocalizedStrings.DEBUG, "PutAll failed since versions were missing; retrying again", e); } if (test_InvalidVersionAction != null) { test_InvalidVersionAction.run(); } super.distribute(); } }
return; final LogWriterI18n log = dr.getLogWriterI18n();
public void run() { UMMMemoryTracker memoryTracker = null; if (CallbackFactoryProvider.getStoreCallbacks().isSnappyStore() && !rgn.isInternalColumnTable()) { memoryTracker = new UMMMemoryTracker( Thread.currentThread().getId(), putAllDataSize); } try { final boolean requiresRegionContext = rgn.keyRequiresRegionContext(); for (int i = 0; i < putAllDataSize; ++i) { if (rgn.getLogWriterI18n().finerEnabled()) { rgn.getLogWriterI18n().finer("putAll processing " + putAllData[i] + " with " + putAllData[i].versionTag); } putAllData[i].setSender(sender); doEntryPut(putAllData[i], rgn, requiresRegionContext, tx, fetchFromHDFS, isPutDML, ev.getEntryLastModified(), memoryTracker); } } finally { if (memoryTracker != null) { long unusedMemory = memoryTracker.freeMemory(); if (unusedMemory > 0) { CallbackFactoryProvider.getStoreCallbacks().releaseStorageMemory( memoryTracker.getFirstAllocationObject(), unusedMemory, false); } } } } }, ev.getEventId());
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; } } }
LogWriterI18n logger = region.getLogWriterI18n(); region.getLogWriterI18n().info(LocalizedStrings.DEBUG, "Requesting the base value for unapplied deltas: " + unappliedDeltas);
protected void saveReceivedRVV(RegionVersionVector rvv) { assert rvv != null; // Make sure the RVV is at least as current as // the provider's was when the GII began. This ensures that a // concurrent clear() doesn't prevent the new region's RVV from being // initialized and that any vector entries that are no longer represented // by stamps in the region are not lost if (TRACE_GII) { region.getLogWriterI18n().info(LocalizedStrings.DEBUG, "Applying received version vector "+rvv.fullToString()+ " to " + region.getName()); } //TODO - RVV - Our current RVV might reflect some operations //that are concurrent updates. We want to keep those updates. However //it might also reflect things that we recovered from disk that we are going //to remove. We'll need to remove those from the RVV somehow. region.getVersionVector().recordVersions(rvv, null); if(region.getDataPolicy().withPersistence()) { region.getDiskRegion().writeRVV(region, false); region.getDiskRegion().writeRVVGC(region); } if (TRACE_GII) { region.getLogWriterI18n().info(LocalizedStrings.DEBUG, "version vector is now " + region.getVersionVector().fullToString()); } }
LogWriterI18n logger = this.region.getLogWriterI18n(); VersionSource<?> myId = this.region.getVersionMember(); while (it.hasNext()) {
if (this.region.concurrencyChecksEnabled && rvv != null) { ImageState state = this.region.getImageState(); LogWriterI18n log = this.region.getLogWriterI18n(); if (state.hasLeftMembers()) { Set<VersionSource> needsSync = null;
@Override public void process(DistributionMessage msg) { ReplyMessage reply = (ReplyMessage)msg; LogWriterI18n logger = region.getLogWriterI18n(); try {
final LogWriterI18n logger = this.region.getLogWriterI18n(); if (logger.fineEnabled() || DistributionManager.VERBOSE || TXStateProxy.LOG_FINE) {
public boolean goWithFullGII(DistributedRegion rgn, RegionVersionVector requesterRVV) { LogWriterI18n logger = rgn.getLogWriterI18n(); if (!rgn.getDataPolicy().withPersistence()) { // non-persistent regions always do full GII if (logger.fineEnabled()) { logger.fine("Region " + rgn.getFullPath() + " is not a persistent region, do full GII"); } return true; } if (!rgn.getVersionVector().isRVVGCDominatedBy(requesterRVV)) { if (logger.fineEnabled()) { logger.fine("Region " + rgn.getFullPath() + "'s local RVVGC is not dominated by remote RVV="+requesterRVV+", do full GII"); } return true; } // TODO GGG: verify GII after UpgradeDiskStore return false; }
@Override protected boolean shouldGenerateVersionTag(RegionEntry entry, EntryEventImpl event) { if (getLogWriterI18n().finerEnabled()) { getLogWriterI18n().finer("shouldGenerateVersionTag this.generateVersionTag="+this.generateVersionTag+" ccenabled="+this.concurrencyChecksEnabled + " dataPolicy="+this.dataPolicy+" event:" + event);
DistributedRegion r = (DistributedRegion)advisee; if (!r.isInitialized() && !r.isUsedForPartitionedRegionBucket()) { if (r.getLogWriterI18n().fineEnabled()) { r.getLogWriterI18n().fine("recording that " + memberId +" has left during initialization of " + r.getName());
throws RemoteOperationException { final DistributedRegion dr = (DistributedRegion)event.getRegion(); final LogWriterI18n log = dr.getLogWriterI18n(); int attempts = 0; for (;;) {
if (getLogWriterI18n().fineEnabled()) { getLogWriterI18n().fine("Event after remoteInvalidate operation: " + event);
this.indexManager.rerunIndexCreationQuery(); } catch (Exception ex) { if (this.getLogWriterI18n().fineEnabled()) { this.getLogWriterI18n().fine( "Exception while clearing indexes after GII failure. " + ex.getMessage());
if (region.getLogWriterI18n().infoEnabled()) { try { CacheClientNotifier ccn = CacheClientNotifier.getInstance();