You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by es...@apache.org on 2017/10/18 18:26:40 UTC
[geode] branch feature/GEODE-3521 updated: Handle a situation that
RegionEntry can be set in the KeyInfo when iterate through keys.
This is an automated email from the ASF dual-hosted git repository.
eshu11 pushed a commit to branch feature/GEODE-3521
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/feature/GEODE-3521 by this push:
new 28efea1 Handle a situation that RegionEntry can be set in the KeyInfo when iterate through keys.
28efea1 is described below
commit 28efea1d95d2332170da73bf3ea9db6653413def
Author: eshu <es...@pivotal.io>
AuthorDate: Wed Oct 18 11:19:51 2017 -0700
Handle a situation that RegionEntry can be set in the KeyInfo when iterate through keys.
---
.../main/java/org/apache/geode/internal/cache/TXManagerImpl.java | 2 +-
.../src/main/java/org/apache/geode/internal/cache/TXStateStub.java | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java
index 06aac77..ebd37cc 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java
@@ -320,7 +320,7 @@ public class TXManagerImpl implements CacheTransactionManager, MembershipListene
TXStateProxy curProxy = txContext.get();
if (curProxy == PAUSED) {
throw new java.lang.IllegalStateException(
- "Currend thread is in a paused state, it can not start a new transaction");
+ "Current thread has paused its transaction so it can not start a new transaction");
}
}
TXId id = new TXId(this.distributionMgrId, this.uniqId.incrementAndGet());
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateStub.java b/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateStub.java
index 6055705..76dbca3 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateStub.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateStub.java
@@ -39,6 +39,7 @@ import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
import org.apache.geode.internal.cache.tier.sockets.VersionedObjectList;
import org.apache.geode.internal.cache.tx.TXRegionStub;
import org.apache.geode.internal.i18n.LocalizedStrings;
+import org.apache.geode.internal.logging.LogService;
/**
* TXStateStub lives on the accessor node when we are remoting a transaction. It is a stub for
@@ -485,7 +486,11 @@ public abstract class TXStateStub implements TXStateInterface {
*/
public Object getKeyForIterator(KeyInfo keyInfo, LocalRegion currRgn, boolean rememberReads,
boolean allowTombstones) {
- return keyInfo.getKey();
+ Object key = keyInfo.getKey();
+ if (key instanceof RegionEntry) {
+ return ((RegionEntry) key).getKey();
+ }
+ return key;
}
/*
--
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].