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/06/02 18:31:14 UTC
[10/10] incubator-geode git commit: removed putDML
removed putDML
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/be2a40bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/be2a40bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/be2a40bb
Branch: refs/heads/feature/GEODE-1464
Commit: be2a40bb3101e3d4a857d408c79a491f2791e993
Parents: 562ab2a
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Thu Jun 2 11:27:07 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Thu Jun 2 11:27:07 2016 -0700
----------------------------------------------------------------------
.../gemfire/internal/cache/DistTXState.java | 2 +-
.../cache/DistributedCacheOperation.java | 5 ----
.../cache/DistributedPutAllOperation.java | 25 ++++----------------
.../gemfire/internal/cache/EntryEventImpl.java | 10 --------
.../gemfire/internal/cache/LocalRegion.java | 8 -------
.../internal/cache/RemotePutAllMessage.java | 9 +------
.../gemfire/internal/cache/TXState.java | 2 +-
.../cache/partitioned/PutAllPRMessage.java | 15 ++++--------
.../internal/cache/partitioned/PutMessage.java | 10 --------
9 files changed, 11 insertions(+), 75 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be2a40bb/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXState.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXState.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXState.java
index 3d6ba96..ed59108 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXState.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXState.java
@@ -572,7 +572,7 @@ public class DistTXState extends TXState {
@Released EntryEventImpl ev = PutAllPRMessage.getEventFromEntry(theRegion,
myId, myId, i, putallOp.putAllData, false, putallOp
.getBaseEvent().getContext(), false, !putallOp.getBaseEvent()
- .isGenerateCallbacks(), false);
+ .isGenerateCallbacks());
try {
// ev.setPutAllOperation(putallOp);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be2a40bb/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
index 77e8876..5413ee7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
@@ -843,8 +843,6 @@ public abstract class DistributedCacheOperation {
private final static int INHIBIT_NOTIFICATIONS_MASK = 0x400;
- protected final static short IS_PUT_DML = 0x100;
-
public boolean needsRouting;
protected String regionPath;
@@ -1344,9 +1342,6 @@ public abstract class DistributedCacheOperation {
}
if ((extBits & INHIBIT_NOTIFICATIONS_MASK) != 0) {
this.inhibitAllNotifications = true;
- if (this instanceof PutAllMessage) {
- ((PutAllMessage) this).setPutDML((extBits & IS_PUT_DML) != 0);
- }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be2a40bb/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedPutAllOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedPutAllOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedPutAllOperation.java
index 971dc3d..b97b727 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedPutAllOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedPutAllOperation.java
@@ -854,7 +854,6 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
PutAllMessage msg = new PutAllMessage();
msg.eventId = event.getEventId();
msg.context = event.getContext();
- msg.setPutDML(event.isPutDML());
return msg;
}
@@ -868,7 +867,7 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
public PutAllPRMessage createPRMessagesNotifyOnly(int bucketId) {
final EntryEventImpl event = getBaseEvent();
PutAllPRMessage prMsg = new PutAllPRMessage(bucketId, putAllDataSize, true,
- event.isPossibleDuplicate(), !event.isGenerateCallbacks(), event.getCallbackArgument(), false /*isPutDML*/);
+ event.isPossibleDuplicate(), !event.isGenerateCallbacks(), event.getCallbackArgument());
if (event.getContext() != null) {
prMsg.setBridgeContext(event.getContext());
}
@@ -897,7 +896,7 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
PutAllPRMessage prMsg = (PutAllPRMessage)prMsgMap.get(bucketId);
if (prMsg == null) {
prMsg = new PutAllPRMessage(bucketId.intValue(), putAllDataSize, false,
- event.isPossibleDuplicate(), !event.isGenerateCallbacks(), event.getCallbackArgument(), event.isPutDML());
+ event.isPossibleDuplicate(), !event.isGenerateCallbacks(), event.getCallbackArgument());
prMsg.setTransactionDistributed(event.getRegion().getCache().getTxManager().isDistributed());
// set dpao's context(original sender) into each PutAllMsg
@@ -1074,8 +1073,6 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
protected EventID eventId = null;
- private transient boolean isPutDML = false;
-
protected static final short HAS_BRIDGE_CONTEXT = UNRESERVED_FLAGS_START;
protected static final short SKIP_CALLBACKS =
(short)(HAS_BRIDGE_CONTEXT << 1);
@@ -1130,11 +1127,10 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
* @param rgn
* the region the entry is put in
*/
- public void doEntryPut(PutAllEntryData entry, DistributedRegion rgn, boolean isPutDML) {
+ public void doEntryPut(PutAllEntryData entry, DistributedRegion rgn) {
@Released EntryEventImpl ev = PutAllMessage.createEntryEvent(entry, getSender(),
this.context, rgn, this.possibleDuplicate,
this.needsRouting, this.callbackArg, true, skipCallbacks);
- ev.setPutDML(isPutDML);
// we don't need to set old value here, because the msg is from remote. local old value will get from next step
try {
super.basicOperateOnRegion(ev, rgn);
@@ -1223,7 +1219,7 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
logger.debug("putAll processing {} with {} sender={}", putAllData[i], putAllData[i].versionTag, sender);
}
putAllData[i].setSender(sender);
- doEntryPut(putAllData[i], rgn, isPutDML);
+ doEntryPut(putAllData[i], rgn);
}
}
}, ev.getEventId());
@@ -1343,18 +1339,5 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
}
return Arrays.asList(ops);
}
-
- public void setPutDML(boolean val) {
- this.isPutDML = val;
- }
-
- @Override
- protected short computeCompressedExtBits(short bits) {
- bits = super.computeCompressedExtBits(bits);
- if (isPutDML) {
- bits |= IS_PUT_DML;
- }
- return bits;
- }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be2a40bb/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 985180d..b206a74 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
@@ -183,8 +183,6 @@ public class EntryEventImpl
/** version tag for concurrency checks */
protected VersionTag versionTag;
- private transient boolean isPutDML = false;
-
/** boolean to indicate that the RegionEntry for this event has been evicted*/
private transient boolean isEvicted = false;
@@ -2807,12 +2805,4 @@ public class EntryEventImpl
public boolean isOldValueOffHeap() {
return isOffHeapReference(this.oldValue);
}
-
- public final boolean isPutDML() {
- return this.isPutDML;
- }
-
- public final void setPutDML(boolean val) {
- this.isPutDML = val;
- }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be2a40bb/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 0b138ed..d7a1199 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
@@ -10572,12 +10572,6 @@ public class LocalRegion extends AbstractRegion
DistributedPutAllOperation dpao = new DistributedPutAllOperation(event, map.size(), false);
return dpao;
}
- public final DistributedPutAllOperation newPutAllForPUTDmlOperation(Map<?, ?> map, Object callbackArg) {
- DistributedPutAllOperation dpao = newPutAllOperation(map, callbackArg);
- dpao.getEvent().setPutDML(true);
- return dpao;
- }
-
public final DistributedRemoveAllOperation newRemoveAllOperation(Collection<?> keys, Object callbackArg) {
if (keys == null) {
@@ -10629,8 +10623,6 @@ public class LocalRegion extends AbstractRegion
putallOp, this, Operation.PUTALL_CREATE, key, value);
try {
- event.setPutDML(putallOp.getEvent().isPutDML());
-
if (tagHolder != null) {
event.setVersionTag(tagHolder.getVersionTag());
event.setFromServer(tagHolder.isFromServer());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be2a40bb/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutAllMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutAllMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutAllMessage.java
index 8462816..513fc4f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutAllMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutAllMessage.java
@@ -82,7 +82,6 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
protected static final short HAS_BRIDGE_CONTEXT = UNRESERVED_FLAGS_START;
protected static final short SKIP_CALLBACKS = (HAS_BRIDGE_CONTEXT << 1);
- protected static final short IS_PUT_DML = (SKIP_CALLBACKS << 1);
private EventID eventId;
@@ -92,8 +91,6 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
// private boolean useOriginRemote;
- private boolean isPutDML;
-
public void addEntry(PutAllEntryData entry) {
this.putAllData[this.putAllDataCount++] = entry;
}
@@ -190,7 +187,6 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
this.eventId = event.getEventId();
this.skipCallbacks = skipCallbacks;
this.callbackArg = event.getCallbackArgument();
- this.isPutDML = event.isPutDML();
}
public RemotePutAllMessage() {
@@ -241,7 +237,6 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
this.bridgeContext = DataSerializer.readObject(in);
}
this.skipCallbacks = (flags & SKIP_CALLBACKS) != 0;
- this.isPutDML = (flags & IS_PUT_DML) != 0;
this.putAllDataCount = (int)InternalDataSerializer.readUnsignedVL(in);
this.putAllData = new PutAllEntryData[putAllDataCount];
if (this.putAllDataCount > 0) {
@@ -303,7 +298,6 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
if (this.posDup) flags |= POS_DUP;
if (this.bridgeContext != null) flags |= HAS_BRIDGE_CONTEXT;
if (this.skipCallbacks) flags |= SKIP_CALLBACKS;
- if (this.isPutDML) flags |= IS_PUT_DML;
return flags;
}
@@ -366,7 +360,6 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
baseEvent.setContext(this.bridgeContext);
}
baseEvent.setPossibleDuplicate(this.posDup);
- baseEvent.setPutDML(this.isPutDML);
if (logger.isDebugEnabled()) {
logger.debug("RemotePutAllMessage.doLocalPutAll: eventSender is {}, baseEvent is {}, msg is {}",
eventSender, baseEvent, this);
@@ -380,7 +373,7 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
// final boolean requiresRegionContext = dr.keyRequiresRegionContext();
InternalDistributedMember myId = r.getDistributionManager().getDistributionManagerId();
for (int i = 0; i < putAllDataCount; ++i) {
- @Released EntryEventImpl ev = PutAllPRMessage.getEventFromEntry(r, myId, eventSender, i, putAllData, false, bridgeContext, posDup, !skipCallbacks, isPutDML);
+ @Released EntryEventImpl ev = PutAllPRMessage.getEventFromEntry(r, myId, eventSender, i, putAllData, false, bridgeContext, posDup, !skipCallbacks);
try {
ev.setPutAllOperation(dpao);
if (logger.isDebugEnabled()) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be2a40bb/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 2510d46..27f2bb8 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
@@ -1761,7 +1761,7 @@ public class TXState implements TXStateInterface {
// final boolean requiresRegionContext = theRegion.keyRequiresRegionContext();
InternalDistributedMember myId = theRegion.getDistributionManager().getDistributionManagerId();
for (int i = 0; i < putallOp.putAllDataSize; ++i) {
- @Released EntryEventImpl ev = PutAllPRMessage.getEventFromEntry(theRegion, myId,myId, i, putallOp.putAllData, false, putallOp.getBaseEvent().getContext(), false, !putallOp.getBaseEvent().isGenerateCallbacks(), false);
+ @Released EntryEventImpl ev = PutAllPRMessage.getEventFromEntry(theRegion, myId,myId, i, putallOp.putAllData, false, putallOp.getBaseEvent().getContext(), false, !putallOp.getBaseEvent().isGenerateCallbacks());
try {
ev.setPutAllOperation(putallOp);
if (theRegion.basicPut(ev, false, false, null, false)) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be2a40bb/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutAllPRMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutAllPRMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutAllPRMessage.java
index 3120403..082a982 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutAllPRMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutAllPRMessage.java
@@ -100,8 +100,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
protected static final short HAS_BRIDGE_CONTEXT = UNRESERVED_FLAGS_START;
protected static final short SKIP_CALLBACKS = (HAS_BRIDGE_CONTEXT << 1);
- //using the left most bit for IS_PUT_DML, the last available bit
- protected static final short IS_PUT_DML = (short) (SKIP_CALLBACKS << 1);
private transient InternalDistributedSystem internalDs;
@@ -116,7 +114,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
transient VersionedObjectList versions = null;
- private boolean isPutDML;
/**
* Empty constructor to satisfy {@link DataSerializer}requirements
*/
@@ -124,7 +121,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
}
public PutAllPRMessage(int bucketId, int size, boolean notificationOnly,
- boolean posDup, boolean skipCallbacks, Object callbackArg, boolean isPutDML) {
+ boolean posDup, boolean skipCallbacks, Object callbackArg) {
this.bucketId = Integer.valueOf(bucketId);
putAllPRData = new PutAllEntryData[size];
this.notificationOnly = notificationOnly;
@@ -132,7 +129,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
this.skipCallbacks = skipCallbacks;
this.callbackArg = callbackArg;
initTxMemberId();
- this.isPutDML = isPutDML;
}
public void addEntry(PutAllEntryData entry) {
@@ -297,7 +293,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
s = super.computeCompressedShort(s);
if (this.bridgeContext != null) s |= HAS_BRIDGE_CONTEXT;
if (this.skipCallbacks) s |= SKIP_CALLBACKS;
- if (this.isPutDML) s |= IS_PUT_DML;
return s;
}
@@ -306,7 +301,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
ClassNotFoundException {
super.setBooleans(s, in);
this.skipCallbacks = ((s & SKIP_CALLBACKS) != 0);
- this.isPutDML = ((s & IS_PUT_DML) != 0);
}
@Override
@@ -473,7 +467,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
* in this request, because these request will be blocked by foundKey
*/
for (int i=0; i<putAllPRDataSize; i++) {
- @Released EntryEventImpl ev = getEventFromEntry(r, myId, eventSender, i,putAllPRData,notificationOnly,bridgeContext,posDup,skipCallbacks, this.isPutDML);
+ @Released EntryEventImpl ev = getEventFromEntry(r, myId, eventSender, i,putAllPRData,notificationOnly,bridgeContext,posDup,skipCallbacks);
try {
key = ev.getKey();
@@ -549,7 +543,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
}
} else {
for (int i=0; i<putAllPRDataSize; i++) {
- EntryEventImpl ev = getEventFromEntry(r, myId, eventSender, i,putAllPRData,notificationOnly,bridgeContext,posDup,skipCallbacks, this.isPutDML);
+ EntryEventImpl ev = getEventFromEntry(r, myId, eventSender, i,putAllPRData,notificationOnly,bridgeContext,posDup,skipCallbacks);
try {
ev.setOriginRemote(true);
if (this.callbackArg != null) {
@@ -585,7 +579,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
InternalDistributedMember myId, InternalDistributedMember eventSender,
int idx, DistributedPutAllOperation.PutAllEntryData[] data,
boolean notificationOnly, ClientProxyMembershipID bridgeContext,
- boolean posDup, boolean skipCallbacks, boolean isPutDML) {
+ boolean posDup, boolean skipCallbacks) {
PutAllEntryData prd = data[idx];
//EntryEventImpl ev = EntryEventImpl.create(r,
// prd.getOp(),
@@ -624,7 +618,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
} else {
ev.setTailKey(prd.getTailKey());
}
- ev.setPutDML(isPutDML);
evReturned = true;
return ev;
} finally {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be2a40bb/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java
index 1bdd6dd..bff6ff7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java
@@ -180,15 +180,11 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
private VersionTag versionTag;
- private transient boolean isPutDML;
-
// additional bitmask flags used for serialization/deserialization
protected static final short CACHE_WRITE = UNRESERVED_FLAGS_START;
protected static final short HAS_EXPECTED_OLD_VAL = (CACHE_WRITE << 1);
protected static final short HAS_VERSION_TAG = (HAS_EXPECTED_OLD_VAL << 1);
- //using the left most bit for IS_PUT_DML, the last available bit
- protected static final short IS_PUT_DML = (short) (HAS_VERSION_TAG << 1);
// extraFlags
protected static final int HAS_BRIDGE_CONTEXT =
@@ -629,10 +625,6 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
if ((flags & HAS_VERSION_TAG) != 0) {
this.versionTag = DataSerializer.readObject(in);
}
- if ((flags & IS_PUT_DML) != 0) {
- this.isPutDML = true;
- }
-
}
@Override
@@ -739,7 +731,6 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
}
}
if (this.versionTag != null) s |= HAS_VERSION_TAG;
- if (this.event.isPutDML()) s |= IS_PUT_DML;
return s;
}
@@ -798,7 +789,6 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
ev.setCausedByMessage(this);
ev.setInvokePRCallbacks(!notificationOnly);
ev.setPossibleDuplicate(this.posDup);
- ev.setPutDML(this.isPutDML);
/*if (this.hasOldValue) {
if (this.oldValueIsSerialized) {
ev.setSerializedOldValue(getOldValueBytes());