usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject [05/50] usergrid git commit: Allow Akka authoritative region to be null and if null, uses current region as authoritative region.
Date Thu, 14 Jul 2016 05:38:11 GMT
Allow Akka authoritative region to be null and if null, uses current region as authoritative
region.


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/14f5f7ab
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/14f5f7ab
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/14f5f7ab

Branch: refs/heads/master
Commit: 14f5f7abd4e9275ce1aba3bfb1b92c97a780bf96
Parents: 25303e6
Author: Dave Johnson <snoopdave@apache.org>
Authored: Mon Jun 27 12:53:39 2016 -0400
Committer: Dave Johnson <snoopdave@apache.org>
Committed: Mon Jun 27 12:53:39 2016 -0400

----------------------------------------------------------------------
 .../usergrid/persistence/actorsystem/ActorSystemManagerImpl.java | 4 +++-
 .../persistence/collection/mvcc/stage/write/WriteCommit.java     | 3 +++
 .../collection/mvcc/stage/write/WriteUniqueVerify.java           | 3 +++
 3 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/14f5f7ab/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
b/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
index 89980bc..05f837d 100644
--- a/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
+++ b/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
@@ -172,7 +172,9 @@ public class ActorSystemManagerImpl implements ActorSystemManager {
         }
 
         if ( StringUtils.isEmpty( actorSystemFig.getAkkaAuthoritativeRegion() )) {
-            throw new RuntimeException( "No value specified for " + ActorSystemFig.AKKA_AUTHORITATIVE_REGION);
+            logger.warn("No value for {} specified, will use current region as authoriative
region",
+                ActorSystemFig.AKKA_AUTHORITATIVE_REGION);
+            //throw new RuntimeException( "No value specified for " + ActorSystemFig.AKKA_AUTHORITATIVE_REGION);
         }
 
         List regionList = Arrays.asList( actorSystemFig.getRegionList().toLowerCase().split(",")
);

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14f5f7ab/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
index 267e793..65d1734 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
@@ -135,6 +135,9 @@ public class WriteCommit implements Func1<CollectionIoEvent<MvccEntity>,
Collect
             if ( region == null ) {
                 region = actorSystemFig.getAkkaAuthoritativeRegion();
             }
+            if ( region == null ) {
+                region = actorSystemFig.getRegion();
+            }
             confirmUniqueFieldsAkka( mvccEntity, version, applicationScope, region );
         } else {
             confirmUniqueFields( mvccEntity, version, applicationScope, logMutation );

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14f5f7ab/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
index 92ea6aa..89431a7 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
@@ -123,6 +123,9 @@ public class WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>>
         if ( region == null ) {
             region = actorSystemFig.getAkkaAuthoritativeRegion();
         }
+        if ( region == null ) {
+            region = actorSystemFig.getRegion();
+        }
         try {
             akkaUvService.reserveUniqueValues( applicationScope, entity, mvccEntity.getVersion(),
region );
 


Mime
View raw message