You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2016/05/21 01:03:52 UTC
[1/2] incubator-geode git commit: removed sqlfAdvisee
Repository: incubator-geode
Updated Branches:
refs/heads/feature/GEODE-1426 [created] 536f64dfe
removed sqlfAdvisee
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/255ee8c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/255ee8c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/255ee8c1
Branch: refs/heads/feature/GEODE-1426
Commit: 255ee8c153c6b49b9f71c1864ce864e2667c9035
Parents: 1af92d8
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Fri May 20 16:34:26 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Fri May 20 16:34:26 2016 -0700
----------------------------------------------------------------------
.../gemfire/internal/cache/ControllerAdvisor.java | 17 -----------------
.../gemfire/internal/cache/GemFireCacheImpl.java | 13 -------------
.../gemfire/internal/cache/GridAdvisor.java | 5 -----
3 files changed, 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/255ee8c1/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ControllerAdvisor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ControllerAdvisor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ControllerAdvisor.java
index ab03d8c..ccc14eb 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ControllerAdvisor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ControllerAdvisor.java
@@ -47,23 +47,6 @@ public class ControllerAdvisor extends GridAdvisor {
return advisor;
}
- /**
- * Tell everyone else who we are and find out who they are.
- */
- @Override
- public final void handshake() {
- super.handshake();
- // also inform local SQLFabric advisor if any
- final GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
- final DistributionAdvisee sqlfAdvisee;
- final DistributionAdvisor sqlfAdvisor;
- GridProfile profile = (GridProfile) createProfile();
- if (cache != null && (sqlfAdvisee = cache.getSqlfAdvisee()) != null
- && (sqlfAdvisor = sqlfAdvisee.getDistributionAdvisor()) != null) {
- sqlfAdvisor.putProfile(profile);
- }
- }
-
@Override
protected void profileCreated(Profile profile) {
super.profileCreated(profile);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/255ee8c1/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
index c44f3b7..d5f1acc 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
@@ -363,11 +363,6 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
private boolean sqlfSystem;
/**
- * SQLFabric's static distribution advisee.
- */
- private volatile DistributionAdvisee sqlfAdvisee;
-
- /**
* the list of all cache servers. CopyOnWriteArrayList is used to allow concurrent add, remove and retrieval
* operations. It is assumed that the traversal operations on cache servers list vastly outnumber the mutative
* operations such as add, remove.
@@ -5053,14 +5048,6 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
return this.regionsInDestroy.get(path);
}
- public DistributionAdvisee getSqlfAdvisee() {
- return this.sqlfAdvisee;
- }
-
- public void setSqlfAdvisee(DistributionAdvisee advisee) {
- this.sqlfAdvisee = advisee;
- }
-
/**
* Mark a node as initialized or not initialized. Used by SQLFabric to avoid creation of buckets or routing of
* operations/functions on a node that is still in the DDL replay phase.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/255ee8c1/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java
index 7c7ac12..fd350a0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java
@@ -318,11 +318,6 @@ public abstract class GridAdvisor extends DistributionAdvisor {
replyProfiles.add(advisee.getProfile());
}
}
- final GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
- if (cache != null && !cache.isClosed()) {
- handleDistributionAdvisee(cache.getSqlfAdvisee(), removeProfile, false,
- replyProfiles);
- }
}
/**
[2/2] incubator-geode git commit: removed sqlfSystem
Posted by ds...@apache.org.
removed sqlfSystem
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/536f64df
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/536f64df
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/536f64df
Branch: refs/heads/feature/GEODE-1426
Commit: 536f64dfe78f9ac9d8ff7a9e685894b43100b75d
Parents: 255ee8c
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Fri May 20 18:03:24 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Fri May 20 18:03:24 2016 -0700
----------------------------------------------------------------------
.../gemfire/cache/AttributesFactory.java | 4 +-
.../internal/InternalDistributedSystem.java | 11 ++---
.../gms/mgr/GMSMembershipManager.java | 2 +-
.../internal/cache/AbstractRegionMap.java | 50 ++------------------
.../gemfire/internal/cache/CacheServerImpl.java | 2 -
.../gemfire/internal/cache/EntriesSet.java | 4 --
.../gemfire/internal/cache/EntryEventImpl.java | 13 +----
.../internal/cache/GemFireCacheImpl.java | 47 +-----------------
.../gemfire/internal/cache/LocalRegion.java | 15 ++----
.../internal/cache/PartitionedRegion.java | 2 +-
.../internal/cache/TXRemoteCommitMessage.java | 7 +--
.../gemfire/internal/cache/TXState.java | 16 +------
.../cache/tier/sockets/AcceptorImpl.java | 11 -----
.../cache/tier/sockets/ServerConnection.java | 4 --
.../sockets/command/GatewayReceiverCommand.java | 6 +--
.../cache/tier/sockets/command/Put.java | 2 +-
.../cache/tier/sockets/command/Put61.java | 3 +-
.../cache/tier/sockets/command/Put65.java | 3 +-
.../DistributedAckRegionCCEDUnitTest.java | 2 +-
.../tier/sockets/AcceptorImplJUnitTest.java | 10 ++--
20 files changed, 31 insertions(+), 183 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java
index fe7910a..c622255 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java
@@ -1337,11 +1337,9 @@ public class AttributesFactory<K,V> {
// on statisticsEnabled.
setStatisticsEnabled(true);
}
- // SQLFabric does not handle PRELOADED, so do not change the policy
if (attrs.getDataPolicy().withReplication()
&& !attrs.getDataPolicy().withPersistence()
- && attrs.getScope().isDistributed()
- && !GemFireCacheImpl.sqlfSystem()) {
+ && attrs.getScope().isDistributed()) {
RegionAttributesImpl<?,?> rattr = attrs;
if (!rattr.isForBucketRegion()) {
if (attrs.getEvictionAttributes().getAction().isLocalDestroy()
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
index 91fa558..552dbe3 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
@@ -2583,14 +2583,9 @@ public class InternalDistributedSystem
List<CacheServerCreation> cacheServerCreation = null;
GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
- boolean inhibitCacheForSQLFire = false;
if (cache != null) {
- if (cache.isSqlfSystem()) {
- inhibitCacheForSQLFire = true;
- } else {
- cacheXML = cache.getCacheConfig().getCacheXMLDescription();
- cacheServerCreation = cache.getCacheConfig().getCacheServerCreation();
- }
+ cacheXML = cache.getCacheConfig().getCacheXMLDescription();
+ cacheServerCreation = cache.getCacheConfig().getCacheServerCreation();
}
DistributionConfig oldConfig = ids.getConfig();
@@ -2755,7 +2750,7 @@ public class InternalDistributedSystem
DM newDM = this.reconnectDS.getDistributionManager();
- if ( !inhibitCacheForSQLFire && (newDM instanceof DistributionManager) ) {
+ if (newDM instanceof DistributionManager) {
// sqlfire will have already replayed DDL and recovered.
// Admin systems don't carry a cache, but for others we can now create
// a cache
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
index e3f1050..bb1ffa1 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
@@ -1605,7 +1605,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
if (cache != null && (cache instanceof Cache)) {
if (!Boolean.getBoolean("gemfire.autoReconnect-useCacheXMLFile")
- && !cache.isSqlfSystem() && !sharedConfigEnabled) {
+ && !sharedConfigEnabled) {
try {
logger.info("generating XML to rebuild the cache after reconnect completes");
StringPrintWriter pw = new StringPrintWriter();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
index 5248d3d..62336f0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
@@ -163,32 +163,7 @@ public abstract class AbstractRegionMap implements RegionMap {
"expected LocalRegion or PlaceHolderDiskRegion");
}
- if (cache != null && cache.isSqlfSystem()) {
- String provider = GemFireCacheImpl.SQLF_ENTRY_FACTORY_PROVIDER;
- try {
- Class<?> factoryProvider = ClassPathLoader.getLatest().forName(provider);
- Method method = factoryProvider.getDeclaredMethod(
- "getRegionEntryFactory", new Class[] { Boolean.TYPE, Boolean.TYPE,
- Boolean.TYPE, Object.class, InternalRegionArguments.class });
- RegionEntryFactory ref = (RegionEntryFactory)method.invoke(null,
- new Object[] { Boolean.valueOf(attr.statisticsEnabled),
- Boolean.valueOf(isLRU), Boolean.valueOf(isDisk), owner,
- internalRegionArgs });
-
- // TODO need to have the SQLF entry factory support version stamp storage
- setEntryFactory(ref);
-
- }
- catch (Exception e) {
- throw new CacheRuntimeException(
- "Exception in obtaining RegionEntry Factory" + " provider class ",
- e) {
- };
- }
- }
- else {
- setEntryFactory(new RegionEntryFactoryBuilder().getRegionEntryFactoryOrNull(attr.statisticsEnabled,isLRU,isDisk,withVersioning,offHeap));
- }
+ setEntryFactory(new RegionEntryFactoryBuilder().getRegionEntryFactoryOrNull(attr.statisticsEnabled,isLRU,isDisk,withVersioning,offHeap));
}
protected CustomEntryConcurrentHashMap<Object, Object> createConcurrentMap(
@@ -2835,7 +2810,6 @@ public abstract class AbstractRegionMap implements RegionMap {
re = getOrCreateRegionEntry(owner, event,
Token.REMOVED_PHASE1, null, onlyExisting, false);
if (re == null) {
- throwExceptionForSqlFire(event);
return null;
}
while (true) {
@@ -2849,7 +2823,6 @@ public abstract class AbstractRegionMap implements RegionMap {
_getOwner().getCachePerfStats().incRetries();
if (re == null) {
// this will happen when onlyExisting is true
- throwExceptionForSqlFire(event);
return null;
}
continue;
@@ -3047,15 +3020,13 @@ public abstract class AbstractRegionMap implements RegionMap {
private void setOldValueInEvent(EntryEventImpl event, RegionEntry re, boolean cacheWrite, boolean requireOldValue) {
boolean needToSetOldValue = getIndexUpdater() != null || cacheWrite || requireOldValue || event.getOperation().guaranteesOldValue();
if (needToSetOldValue) {
- if (event.hasDelta() || event.getOperation().guaranteesOldValue()
- || GemFireCacheImpl.sqlfSystem()) {
+ if (event.hasDelta() || event.getOperation().guaranteesOldValue()) {
// In these cases we want to even get the old value from disk if it is not in memory
ReferenceCountHelper.skipRefCountTracking();
@Released Object oldValueInVMOrDisk = re.getValueOffHeapOrDiskWithoutFaultIn(event.getLocalRegion());
ReferenceCountHelper.unskipRefCountTracking();
try {
- event.setOldValue(oldValueInVMOrDisk, requireOldValue
- || GemFireCacheImpl.sqlfSystem());
+ event.setOldValue(oldValueInVMOrDisk, requireOldValue);
} finally {
OffHeapHelper.releaseWithNoTracking(oldValueInVMOrDisk);
}
@@ -3067,8 +3038,7 @@ public abstract class AbstractRegionMap implements RegionMap {
ReferenceCountHelper.unskipRefCountTracking();
try {
- event.setOldValue(oldValueInVM,
- requireOldValue || GemFireCacheImpl.sqlfSystem());
+ event.setOldValue(oldValueInVM, requireOldValue);
} finally {
OffHeapHelper.releaseWithNoTracking(oldValueInVM);
}
@@ -3084,18 +3054,6 @@ public abstract class AbstractRegionMap implements RegionMap {
}
}
- /**
- * Asif: If the system is sqlfabric and the event has delta, then re == null
- * implies update on non existent row . Throwing ENFE in that case
- * As returning a boolean etc has other complications in terms of PR reattempt etc
- */
- private void throwExceptionForSqlFire(EntryEventImpl event) {
- if (event.hasDelta() && _getOwner().getGemFireCache().isSqlfSystem()) {
- throw new EntryNotFoundException(
- "SqlFabric::No row found for update");
- }
- }
-
protected void createEntry(EntryEventImpl event, final LocalRegion owner,
RegionEntry re) throws RegionClearedException {
final boolean wasTombstone = re.isTombstone();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java
index edc44d3..98603ed 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java
@@ -307,7 +307,6 @@ public class CacheServerImpl
@Override
public synchronized void start() throws IOException {
Assert.assertTrue(this.cache != null);
- boolean isSqlFabricSystem = ((GemFireCacheImpl)this.cache).isSqlfSystem();
this.serialNumber = createSerialNumber();
if (DynamicRegionFactory.get().isOpen()) {
@@ -349,7 +348,6 @@ public class CacheServerImpl
getTransactionTimeToLive(),
this.loadMonitor,
overflowAttributesList,
- isSqlFabricSystem,
this.isGatewayReceiver,
this.gatewayTransportFilters, this.tcpNoDelay);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntriesSet.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntriesSet.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntriesSet.java
index e527d39..50add2b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntriesSet.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntriesSet.java
@@ -46,8 +46,6 @@ public class EntriesSet extends AbstractSet {
protected final InternalDataView view;
- final boolean skipTxCheckInIteration;
-
final boolean rememberReads;
private boolean keepSerialized = false;
@@ -65,8 +63,6 @@ public class EntriesSet extends AbstractSet {
this.recursive = recursive;
this.iterType = viewType;
this.myTX = region.getTXState();
- this.skipTxCheckInIteration = skipTxCheckInIteration
- || region.getGemFireCache().isSqlfSystem();
this.view = this.myTX == null ? region.getSharedDataView() : this.myTX;
this.rememberReads = true;
this.allowTombstones = allowTombstones;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
index b833ecb..68c8117 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
@@ -1655,23 +1655,14 @@ public class EntryEventImpl
if (requireOldValue ||
EVENT_OLD_VALUE
|| this.region instanceof HARegion // fix for bug 37909
- || GemFireCacheImpl.sqlfSystem()
) {
@Retained Object ov;
if (ReferenceCountHelper.trackReferenceCounts()) {
ReferenceCountHelper.setReferenceCountOwner(new OldValueOwner());
- if (GemFireCacheImpl.sqlfSystem()) {
- ov = reentry.getValueOffHeapOrDiskWithoutFaultIn(this.region);
- } else {
- ov = reentry._getValueRetain(owner, true);
- }
+ ov = reentry._getValueRetain(owner, true);
ReferenceCountHelper.setReferenceCountOwner(null);
} else {
- if (GemFireCacheImpl.sqlfSystem()) {
- ov = reentry.getValueOffHeapOrDiskWithoutFaultIn(this.region);
- } else {
- ov = reentry._getValueRetain(owner, true);
- }
+ ov = reentry._getValueRetain(owner, true);
}
if (ov == null) ov = Token.NOT_AVAILABLE;
// ov has already been retained so call basicSetOldValue instead of retainAndSetOldValue
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
index d5f1acc..9030cf7 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
@@ -359,9 +359,6 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
/** thread pool for event dispatching */
private final ThreadPoolExecutor eventThreadPool;
- /** indicates whether this is a SQLFabric system */
- private boolean sqlfSystem;
-
/**
* the list of all cache servers. CopyOnWriteArrayList is used to allow concurrent add, remove and retrieval
* operations. It is assumed that the traversal operations on cache servers list vastly outnumber the mutative
@@ -541,14 +538,8 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
private final int serialNumber;
- /** system property to indicate SQLFabric product */
- public static final String SQLFABRIC_PRODUCT_PROP = "sqlfabric.product";
-
private final TXEntryStateFactory txEntryStateFactory;
- static final String SQLF_ENTRY_FACTORY_PROVIDER = "com.gemstone.sqlfabric."
- + "internal.engine.store.entry.RegionEntryFactoryProvider";
-
private final CacheConfig cacheConfig;
private final DiskStoreMonitor diskMonitor;
@@ -927,23 +918,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
}
// set custom entry factories for SQLFabric
- this.sqlfSystem = Boolean.getBoolean(SQLFABRIC_PRODUCT_PROP);
- if (this.sqlfSystem) {
- String provider = SQLF_ENTRY_FACTORY_PROVIDER;
- try {
- Class<?> factoryProvider = Class.forName(provider);
- Method method = factoryProvider.getDeclaredMethod("getTXEntryStateFactory", new Class[0]);
- TXEntryStateFactory ref = (TXEntryStateFactory) method.invoke(null, new Object[0]);
- this.txEntryStateFactory = ref;
-
- } catch (Exception e) {
- throw new CacheRuntimeException("Exception in obtaining SQLFabric " + "RegionEntry Factory provider class", e) {
- private static final long serialVersionUID = -6456778743822843838L;
- };
- }
- } else {
- this.txEntryStateFactory = TXEntryState.getFactory();
- }
+ this.txEntryStateFactory = TXEntryState.getFactory();
if (xmlParameterizationEnabled) {
/** If gemfire prperties file is available replace properties from there */
Properties userProps = this.system.getConfig().getUserDefinedProps();
@@ -985,8 +960,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
final DistributionConfig config = this.system.getConfig();
if (dm instanceof DistributionManager) {
- if (!this.sqlfSystem
- && ((DistributionManager) dm).getDMType() != DistributionManager.LOCATOR_DM_TYPE
+ if (((DistributionManager) dm).getDMType() != DistributionManager.LOCATOR_DM_TYPE
&& !isClient
&& Locator.getLocator() == null
) {
@@ -4754,11 +4728,6 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
}
public static void initializeRegionShortcuts(Cache c) {
- // no shortcuts for SQLFabric since these are not used and some combinations
- // are not supported
- if (sqlfSystem()) {
- return;
- }
for (RegionShortcut pra : RegionShortcut.values()) {
switch (pra) {
case PARTITION: {
@@ -5118,18 +5087,6 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
}
}
- public final boolean isSqlfSystem() {
- return this.sqlfSystem;
- }
-
- public static boolean sqlfSystem() {
- return (instance != null && instance.isSqlfSystem());
- }
-
- public void setSqlfSystem() {
- this.sqlfSystem = true;
- }
-
public TombstoneService getTombstoneService() {
return this.tombstoneService;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
index d28496c..ab8a230 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
@@ -5567,7 +5567,7 @@ public class LocalRegion extends AbstractRegion
public boolean basicBridgePut(Object key, Object value, byte[] deltaBytes,
boolean isObject, Object p_callbackArg, ClientProxyMembershipID memberId,
- boolean fromClient, EntryEventImpl clientEvent, boolean isSqlFabricSystem)
+ boolean fromClient, EntryEventImpl clientEvent)
throws TimeoutException, CacheWriterException {
EventID eventID = clientEvent.getEventId();
Object callbackArg = p_callbackArg;
@@ -5599,14 +5599,7 @@ public class LocalRegion extends AbstractRegion
// serialized in a CachedDeserializable; otherwise store it directly
// as a byte[].
if (isObject && value instanceof byte[]) {
- //Asif: If the system is SqlFabric, then the value byte[] corresponds to
- //Delta , so we need to deserialize it & appropriately set the EntryEventImpl's.delta
- //field to this value
- if (isSqlFabricSystem) {
- event.setNewValue(EntryEventImpl.deserialize((byte[])value));
- } else {
- event.setSerializedNewValue((byte[])value);
- }
+ event.setSerializedNewValue((byte[])value);
}
else {
event.setNewValue(value);
@@ -5614,9 +5607,7 @@ public class LocalRegion extends AbstractRegion
boolean ifNew = false; // can overwrite an existing key
- //Asif: If the system is SqlFabric, then update will always have value of type
- //SerializableDelta (i.e Delta) which requires that the old value should be present
- boolean ifOld = isSqlFabricSystem ; //false; // can create a new key
+ boolean ifOld = false; // can create a new key
long lastModified = 0L; // use now
boolean overwriteDestroyed = false; // not okay to overwrite the DESTROYED token
boolean success = false;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
index 4460a8a..ea207ae 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
@@ -6503,7 +6503,7 @@ public class PartitionedRegion extends LocalRegion implements
}
public Object next() {
- if (myTX != null && !skipTxCheckInIteration) {
+ if (myTX != null) {
checkTX();
}
PartitionedRegion.this.checkReadiness();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRemoteCommitMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRemoteCommitMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRemoteCommitMessage.java
index cd75864..03361d5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRemoteCommitMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRemoteCommitMessage.java
@@ -109,12 +109,7 @@ public class TXRemoteCommitMessage extends TXMessage {
}
}
} finally {
- //Asif: If commit is successful then only remove the tx state
- // else we expect a rollback to be issued . This is necessary for Sqlfabric
- //so that GFETransaction object behaves properly. presently adding this check
- //only for sqlfabric, but may be this should hold true for GFE. Need to check if
- //GFE in such cases send the rollback message or not.
- if (commitSuccessful || !cache.isSqlfSystem()) {
+ if (commitSuccessful) {
txMgr.removeHostedTXState(txId);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXState.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXState.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXState.java
index 617873c..e610991 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXState.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXState.java
@@ -1128,12 +1128,7 @@ public class TXState implements TXStateInterface {
Object expectedOldValue)
throws EntryNotFoundException {
boolean createIfAbsent = true;
- // Asif: If it is a sqlf system & a delta arrives it implies it is update
- // which means old value is must so, in this case RememberRead should be
- // false ( no point in creating TxEntry)
- if (event.hasDelta() && region.getGemFireCache().isSqlfSystem()) {
- createIfAbsent = false;
- } else if (event.getOperation() == Operation.REPLACE) {
+ if (event.getOperation() == Operation.REPLACE) {
// replace(K,V) and replace(K,V,V) cannot create an entry
createIfAbsent = false;
}
@@ -1203,14 +1198,7 @@ public class TXState implements TXStateInterface {
}
}
catch (EntryNotFoundException e) {
- if (region.getCache().isSqlfSystem()) {
- // Asif:throw entry not found exception as sqlfabric is relying on it
- // for transactional update on non existent row.
- throw e;
- }
- else {
- result = false;
- }
+ result = false;
} finally {
recordEventAndResult(event, result);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
index eeb611e..c2f3828 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
@@ -255,9 +255,6 @@ public class AcceptorImpl extends Acceptor implements Runnable
/** The client health monitor tracking connections for this acceptor */
private ClientHealthMonitor healthMonitor;
- //Identifies if this Acceptor was started by SqlFabric Procedure
- private final boolean isSqlFabricHub ;
-
/** bridge's setting of notifyBySubscription */
private final boolean notifyBySubscription;
@@ -296,8 +293,6 @@ public class AcceptorImpl extends Acceptor implements Runnable
* the maximum number of connections allowed in the server pool
* @param maxThreads
* the maximum number of threads allowed in the server pool
- * @param isSqlfStarted
- * true if the Accpetor is started via SqlFabric procedure
*
* @see SocketCreator#createServerSocket(int, int, InetAddress)
* @see ClientHealthMonitor
@@ -310,7 +305,6 @@ public class AcceptorImpl extends Acceptor implements Runnable
int maximumMessageCount, int messageTimeToLive,
int transactionTimeToLive,
ConnectionListener listener,List overflowAttributesList,
- boolean isSqlfStarted,
boolean isGatewayReceiver, List<GatewayTransportFilter> transportFilter,
boolean tcpNoDelay)
throws IOException
@@ -318,7 +312,6 @@ public class AcceptorImpl extends Acceptor implements Runnable
this.bindHostName = calcBindHostName(c, bindHostName);
this.connectionListener = listener == null ? new ConnectionListenerAdapter() : listener;
this.notifyBySubscription = notifyBySubscription;
- this.isSqlFabricHub = isSqlfStarted;
this.isGatewayReceiver = isGatewayReceiver;
this.gatewayTransportFilters = transportFilter;
{
@@ -1826,10 +1819,6 @@ public class AcceptorImpl extends Acceptor implements Runnable
return connectionListener;
}
- public boolean isSqlFabricSystem() {
- return this.isSqlFabricHub;
- }
-
public boolean isGatewayReceiver() {
return this.isGatewayReceiver;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java
index e608db3..56aba4d 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java
@@ -2099,8 +2099,4 @@ public class ServerConnection implements Runnable {
public void setClientDisconnectCleanly() {
this.clientDisconnectedCleanly = true;
}
-
- public boolean isSqlFabricSystem() {
- return this.acceptor.isSqlFabricSystem();
- }
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/GatewayReceiverCommand.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/GatewayReceiverCommand.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/GatewayReceiverCommand.java
index fce1175..448be92 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/GatewayReceiverCommand.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/GatewayReceiverCommand.java
@@ -340,8 +340,7 @@ public class GatewayReceiverCommand extends BaseCommand {
// attempt to update the entry
if (!result) {
result = region.basicBridgePut(key, value, null, isObject,
- callbackArg, servConn.getProxyID(), false, clientEvent,
- servConn.isSqlFabricSystem());
+ callbackArg, servConn.getProxyID(), false, clientEvent);
}
if (result || clientEvent.isConcurrencyConflict()) {
@@ -441,8 +440,7 @@ public class GatewayReceiverCommand extends BaseCommand {
isObject = putContext.isObject();
}
boolean result = region.basicBridgePut(key, value, null, isObject,
- callbackArg, servConn.getProxyID(), false, clientEvent,
- servConn.isSqlFabricSystem());
+ callbackArg, servConn.getProxyID(), false, clientEvent);
if (result|| clientEvent.isConcurrencyConflict()) {
servConn.setModificationInfo(true, regionName, key);
stats.incUpdateRequest();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put.java
index 35cc085..21c1b02 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put.java
@@ -198,7 +198,7 @@ public class Put extends BaseCommand {
else {
// Put the entry
result = region.basicBridgePut(key, value, null, isObject, callbackArg,
- servConn.getProxyID(), true, new EventIDHolder(eventId), servConn.isSqlFabricSystem());
+ servConn.getProxyID(), true, new EventIDHolder(eventId));
}
if (result) {
servConn.setModificationInfo(true, regionName, key);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put61.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put61.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put61.java
index cc4c1d6..941f711 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put61.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put61.java
@@ -233,8 +233,7 @@ public class Put61 extends BaseCommand {
delta = valuePart.getSerializedForm();
}
result = region.basicBridgePut(key, value, delta, isObject,
- callbackArg, servConn.getProxyID(), true, new EventIDHolder(eventId), servConn
- .isSqlFabricSystem());
+ callbackArg, servConn.getProxyID(), true, new EventIDHolder(eventId));
}
if (result) {
servConn.setModificationInfo(true, regionName, key);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put65.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put65.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put65.java
index 9be1390..40a68ee 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put65.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Put65.java
@@ -405,8 +405,7 @@ public class Put65 extends BaseCommand {
servConn.getProxyID(), true, clientEvent, true);
} else {
result = region.basicBridgePut(key, value, delta, isObject,
- callbackArg, servConn.getProxyID(), true, clientEvent, servConn
- .isSqlFabricSystem());
+ callbackArg, servConn.getProxyID(), true, clientEvent);
}
if (msg.isRetry() && clientEvent.isConcurrencyConflict()
&& clientEvent.getVersionTag() != null) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
index 8f922a0..3684e70 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
@@ -475,7 +475,7 @@ public class DistributedAckRegionCCEDUnitTest extends DistributedAckRegionDUnitT
tag.setRegionVersion(CCRegion.getVersionVector().getNextVersion());
VersionTagHolder holder = new VersionTagHolder(tag);
ClientProxyMembershipID id = ClientProxyMembershipID.getNewProxyMembership(CCRegion.getDistributionManager().getSystem());
- CCRegion.basicBridgePut("cckey0", "newvalue", null, true, null, id, true, holder, false);
+ CCRegion.basicBridgePut("cckey0", "newvalue", null, true, null, id, true, holder);
vm0.invoke(new SerializableRunnable("check conflation count") {
public void run() {
assertEquals("expected one conflated event", 1, CCRegion.getCachePerfStats().getConflatedEventsCount());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/536f64df/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImplJUnitTest.java
index e43797c..0ac9357 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImplJUnitTest.java
@@ -87,7 +87,7 @@ public class AcceptorImplJUnitTest
AcceptorImpl.MINIMUM_MAX_CONNECTIONS - 1,
CacheServer.DEFAULT_MAX_THREADS,
CacheServer.DEFAULT_MAXIMUM_MESSAGE_COUNT,
- CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE,0,null,null, false, false, Collections.EMPTY_LIST,
+ CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE,0,null,null, false, Collections.EMPTY_LIST,
CacheServer.DEFAULT_TCP_NO_DELAY);
fail("Expected an IllegalArgumentExcption due to max conns < min pool size");
} catch (IllegalArgumentException expected) {
@@ -104,7 +104,7 @@ public class AcceptorImplJUnitTest
0,
CacheServer.DEFAULT_MAX_THREADS,
CacheServer.DEFAULT_MAXIMUM_MESSAGE_COUNT,
- CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE,0,null,null,false, false, Collections.EMPTY_LIST,
+ CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE,0,null,null,false, Collections.EMPTY_LIST,
CacheServer.DEFAULT_TCP_NO_DELAY);
fail("Expected an IllegalArgumentExcption due to max conns of zero");
} catch (IllegalArgumentException expected) {
@@ -121,7 +121,7 @@ public class AcceptorImplJUnitTest
AcceptorImpl.MINIMUM_MAX_CONNECTIONS,
CacheServer.DEFAULT_MAX_THREADS,
CacheServer.DEFAULT_MAXIMUM_MESSAGE_COUNT,
- CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE,0,null,null,false, false, Collections.EMPTY_LIST,
+ CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE,0,null,null,false, Collections.EMPTY_LIST,
CacheServer.DEFAULT_TCP_NO_DELAY);
a2 = new AcceptorImpl(
port1,
@@ -133,7 +133,7 @@ public class AcceptorImplJUnitTest
AcceptorImpl.MINIMUM_MAX_CONNECTIONS,
CacheServer.DEFAULT_MAX_THREADS,
CacheServer.DEFAULT_MAXIMUM_MESSAGE_COUNT,
- CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE,0,null,null,false, false, Collections.EMPTY_LIST,
+ CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE,0,null,null,false, Collections.EMPTY_LIST,
CacheServer.DEFAULT_TCP_NO_DELAY);
fail("Expecetd a BindException while attaching to the same port");
} catch (BindException expected) {
@@ -149,7 +149,7 @@ public class AcceptorImplJUnitTest
AcceptorImpl.MINIMUM_MAX_CONNECTIONS,
CacheServer.DEFAULT_MAX_THREADS,
CacheServer.DEFAULT_MAXIMUM_MESSAGE_COUNT,
- CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE,0,null,null, false, false, Collections.EMPTY_LIST,
+ CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE,0,null,null, false, Collections.EMPTY_LIST,
CacheServer.DEFAULT_TCP_NO_DELAY);
assertEquals(port2, a3.getPort());
InternalDistributedSystem isystem = (InternalDistributedSystem) this.cache.getDistributedSystem();